Advantage Concepts
Advantage Expression Engine function that extracts a substring beginning with the first character in a string
LEFT(<cString>, <nCount>) à cSubString
<cString> |
A character string from which to extract characters. The maximum size of <cString> is 65,535 (64K) bytes. |
<nCount> |
The number of characters to extract. |
LEFT() returns the leftmost <nCount> characters of <cString> as a character string. If <nCount> is negative or zero, LEFT() returns a null string (""). If <nCount> is larger than the length of the character string, LEFT() returns the entire string.
LEFT() is a character function that returns a substring of a specified character string. It is the same as SUBSTR(<cString>, 1, <nCount>). LEFT() is also like RIGHT(), which returns a substring beginning with the last character in a string.
LEFT(), RIGHT(), and SUBSTR() are often used with both the AT() and RAT() functions to locate the first and/or the last position of a substring before extracting it.
Note Advantage Expression Engine functions can be used in expressions such as record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.
Note Memo, binary, and image fields are not supported in this Advantage Expression Engine function. If memo, binary, or image fields are used with this expression engine function, the Advantage Expression Engine will be unable to evaluate the expression.