PowerCenter
- PowerCenter 10.4.0
- All Products
substring (string, start[ ,length] )
Argument
| Description
|
---|---|
string | String datatype. The string to search.
|
start | Integer datatype. Passes the position in the string to start counting. If the start position is a positive number, substring locates the start position by counting from the beginning of the string. The first character is one. If the start position is a negative number, substring locates the start position by counting from the end of the string.
|
length | Integer datatype. Must be greater than zero. Passes the number of characters to return in a string. If you omit the length argument, substring returns all of the characters from the start position to the end of the string.
|
substring( PHONE, 1, 3 )
|
|
---|---|
|
|
|
|
substring ( phone, 5, 8 )
|
|
---|---|
|
|
|
|
substring ( PHONE, -8, 3 )
|
|
---|---|
|
|
|
|
|
|
|
|
substring ( 'abcd', 2, 8 )
substring ( 'abcd', -2, 8 ) returns ‘cd.’