Progress
SQL-92
Guide and Reference


SUBSTR Function

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

SUBSTR ( char_expression, start_pos [ , length ] ) 

EXAMPLE

This example illustrates the SUBSTR function:

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

NOTES

COMPATIBILITY

Progress Extension


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