LEFT( )
Extracts a substring from a string, starting from the leftmost, or first, character.
Syntax
LEFT(str)
LEFT(str, n)
Arguments
str
The string from which to extract a substring.
n
The number of characters to extract, starting from the first character.
Returns
A substring of a specific length.
If you omit n, the number of characters to extract, the function returns the first character only.
If n is zero, the function returns an empty string.
If n is greater than the length of the string, the function returns the entire string.
Example
The following example displays the first letter of each name in the CustomerName data field:
LEFT([CustomerName])
The following example uses the LEFT( ) and FIND( ) functions to display the characters preceding the hyphen in a product code:
LEFT([ProductCode], FIND("‑", [ProductCode]))
If the product code is ModelA‑1234, LEFT( ) returns the following string:
ModelA