Skip to main content

Celonis Product Documentation

LEFT
Description

LEFT returns the first n characters of a string. If the string is smaller than n characters, the whole string is returned.

Supported input column types: STRING

Output column type: STRING

Syntax
 LEFT ( table.column, n )

If n is zero or negative, an empty STRING will be returned for all input, except NULL.

NULL handling

If the input value is NULL, the result is NULL as well.

Example

[1]

Get first character of string.

Query

Column1

         LEFT ( "Table1"."Column1" , 1 )
        

Input

Output

Table1

Column1 : string

'abc'

' bc'

''

null

' '

null

'Left'

'Right'

Result

Column1 : string

'a'

' '

''

null

' '

null

'L'

'R'

See also: