Functions and operators : LEFT( )

LEFT( )

Extracts a substring from a string, starting from the left-most, 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.

n  
n  
n  

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