Using QMF

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                                      |
+--------------------------------------------------------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]