LEFT

The LEFT function returns a specified number of characters from the left side of a string.

Function Name

LEFT

Description

Returns a specified number of characters starting from the left of an input string.

Arguments

LEFT('STRING', LENGTH)

Where:

  • String is the string expression in which to search. The string has to be enclosed within single quotations. For more information, see String
  • Length is a numerical expression (REAL or INTEGER) that indicates the number of characters to be returned. If the LENGTH is 0, no characters are returned. If the LENGTH is equal to or greater than the total number of characters in the string, the entire string is returned.
Returns

STRING.

The returned value is a string value that consists of the specified number of characters. The characters are taken from the defined input string, beginning at the first character from the left of the string.

Example:

The expression:

LEFT( 'Pipeline', 4 )

returns:

Pipe

(4 characters starting from the left of the 'Pipeline' string).


Disclaimer

Geo SCADA Expert 2019