Returns a specified number of characters from the beginning of a string.
LEFT ( string-expression, numeric-expression )
numeric-expression The number of characters to return.
The following statement returns the value “choco”:
SELECT LEFT( 'chocolate', 5 ) FROM iq_dummy
If the string contains multibyte characters, and the proper collation is being used, the number of bytes returned may be greater than the specified number of characters.
The
result datatype of a LEFTfunction is a LONG
VARCHAR. If you use LEFT in a SELECT
INTO statement, you must have a Large Objects Management
option license or use CAST and set LEFT to
the correct datatype and size.
See “REPLACE function [String]” for more information.
Chapter 11, “International Languages and Character Sets” in the Sybase IQ System Administration Guide