DB2 graphic  QMF Version 8

Displaying parts of a value

The SUBSTR function returns a substring of a string. The format of SUBSTR is:

SUBSTR(M,N,L)

Where:

The following SQL statement selects a column that contains a last name and a column that contains the first initial of the first name. When you run this statement:

SELECT LASTNAME, SUBSTR(FIRSTNAME,1,1)
  FROM Q.INTERVIEW
  WHERE MANAGER = 140

QMF produces this report:

   LASTNAME   INIT
   ---------  ----
   MONTEZ     R
   GASPARD    P


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