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

Description

<left logical expression> OR <right logical expression> evaluates to true, when either the left or the right hand side logical expression is true. Evaluates to false otherwise.

Parentheses may be used to simply make the complete logical expression more readable, but can also be used to change the meaning of the complete logical expression. This is possible through the order of precedence for logical expressions, described in the Functions and Operators section.

Syntax

logical expression OR logical expression

NULL handling

If both logical expressions are NULL, false will be returned because none of the expressions could be fulfilled. If one of the expressions is NULL while the other one is not, the result of the non-NULL expression determines the output.

Examples


[1] OR in a CASE WHEN context.

Query
Column1
CASE WHEN "Table1"."Column1" < 2 OR "Table1"."Column1" > 4 THEN "Table1"."Column1" ELSE null END
Input
Table1
Column1 : INT
1
3
5
Output
Result
Column1 : INT
1
null
5



[2] OR in a FILTER context.

Query
Filter
FILTER ( "Table1"."Column1" < 2 ) OR ( "Table1"."Column2" > 14 );
Column1
"Table1"."Column1"
Column2
"Table1"."Column2"
Input
Table1
Column1 : INTColumn2 : INT
1
11
3
13
5
15
Output
Result
Column1 : INTColumn2 : INT
1
11
5
15



[3] OR in a PU_SUM context, specifically the filter part of the Pull-Up-Function.

Query
Column1
"companyDetail"."companyCode"
Column2
PU_SUM (
    "companyDetail" ,
    "caseTable"."value" ,
    ( "caseTable"."value" < 250 ) OR ( "caseTable"."value" > 500 )
)
Input
caseTable
caseId : INTcompanyCode : STRINGvalue : INT
1
'001'
600
2
'001'
400
3
'001'
200
4
'002'
300
5
'002'
300
6
'003'
200
companyDetail
companyCode : STRINGcountry : STRING
'001''DE'
'002''DE'
'003''US'

Foreign Keys
caseTable.companyCodecompanyDetail.companyCode
Output
Result
Column1 : STRINGColumn2 : INT
'001'
800
'002'
null
'003'
200


  • No labels