Skip to main content

PQL47 (PQL Function Library - CPM 4.7)

CONCAT

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

Description

CONCAT returns the concatenation of two strings. The || operator returns the concatenation of two or more strings.

Supported input column types: STRING, INT, FLOAT. INT and FLOAT types are internally automatically converted to STRING before the concatenation is executed.

Output column type: STRING

Syntax
CONCAT ( table.column1, table.column2 )
table.column1 || table.column2 [ || table.columnN ]* 
NULL handling

If at least one value is NULL, the result of the concatenation is NULL.

Examples

[1] Concatenate column values with constant string.

Query

Column1

CONCAT ( "Table1"."Column1" , 'berry' )

Input

Output

Table1

Column1 : STRING

'blue'

'black'

'cran'

'huckle'

Result

Column1 : STRING

'blueberry'

'blackberry'

'cranberry'

'huckleberry'

[2] Concatenation of 3 strings with ||.

Query

Column1

"Table1"."Column1" || "Table1"."Column2" || "Table1"."Column3"

Input

Output

Table1

Column1 : STRING

Column2 : STRING

Column3 : STRING

'a'

'b'

'c'

' a'

'b '

'd'

''

''

''

null

'a'

'b'

''

null

'c'

null

null

'd'

''

''

''

'one'

'two'

'x'

Result

Column1 : STRING

'abc'

' ab d'

''

null

null

null

''

'onetwox'

[3] Concatenation of INT, STRING and FLOAT.

Query

Column1

"Table1"."Index" || '. ' || "Table1"."Name" || ': ' || "Table1"."Value"

Input

Output

Table1

Index : INT

Name : STRING

Value : FLOAT

1

'pi'

3.14159

2

'e'

2.71828

Result

Column1 : STRING

'1. pi: 3.14159'

'2. e: 2.71828'

See also: