DB2 graphic  QMF Version 8

Finding the length of a value

The LENGTH function returns the length of a value. The length of a character string is

The following SQL statement shows the length of a timestamp, which is 10. When you run this statement:

SELECT TIMESTAMP, LENGTH(TIMESTAMP)
  FROM Q.PROJECT
  WHERE DEPT = 51

QMF produces this report:

   TIMESTAMP                        LENGTH
   --------------------------  -----------
   1994-12-18-10.22.23.000001           10
   1996-03-13-12.22.14.201966           10


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004