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
[ Previous Page | Next Page | Contents | Index ]