Progress
SQL-92
Guide and Reference


SUBSTRING Function (ODBC Compatible)

Returns the substring of the character string corresponding to the first argument starting at start_pos and length characters long. If the third argument length is not specified, the substring starting at start_pos up to the end of char_expression is returned.

SYNTAX

SUBSTRING ( char_expression, start_pos [ , length ] )  

EXAMPLE

This example illustrates the SUBSTRING function:

SELECT last_name, ’(’, SUBSTRING (phone, 1, 3) , ’)’,
          SUBSTRING (phone, 4, 3), ’-’, 
          SUBSTRING (phone, 7, 4)
  FROM customer ; 

NOTES

COMPATIBILITY

ODBC Compatible


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095