Skip to main content

PQL46 (PQL Function Library - CPM 4.6)

RIGHT

Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6

Description

RIGHT returns the last 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

NULL values: If the value is NULL, the result is NULL

Syntax
RIGHT ( table.column, n ) 
Example

[1] Get last character of string.

Query

Column1

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

Input

Output

Table1

Column1 : STRING

'Tree'

' leaf'

'branch '

''

null

''

Result

Column1 : STRING

'e'

'f'

''

''

null

''