Use the @STREXT function to extract a portion of a string.
Syntax
result = @STREXT (string, begin_position, end_position)
stringThe string from which to extract. The string can be either the name of a column or a literal string. Enclose literals within quotes.
begin_positionThe character position at which to begin extracting.
end_positionThe character position at which to end extracting. The end position is included in the extraction.
Example
The following example uses three @STREXT functions to extract a phone number into three different columns.
AREA_CODE = @STREXT (PHONE, 1, 3), PREFIX = @STREXT (PHONE, 4, 6), PHONE_NO = @STREXT (PHONE, 7, 10)