LEFT Function

Returns the left-most characters of a string.

Category: String
Returned data type: String

Syntax

LEFT(source, count)

Required Arguments

source

specifies a string to search; this can be specified as string constant, field name, or expression.

Note If source is NULL, the function returns a NULL value.

count

specifies an integer that indicates how many characters to return; this can be specified as numeric constant, field name, or expression.

Note When a count of zero or less is specified, an empty string is returned.

Example

source = "abcdefg"
result = left(source, 4) // outputs the string "abcd"