Six Stars

equal operator expression

Hi Talend Folks,

                      I need to check equal condition for three column.

whether it is possible or not?

if possible means please tell me? 

whether below Sample expression correct or wrong?

Below Sample expression column is int data type.

 

sample expression:

(row1.Base == row2.PL == row3.Loss)?"Ok" : "Not Ok"

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: equal operator expression

You need to explicitly compare all 3 operands:

((row1.Base == row2.PL) && (row1.Base == row3.Loss))?"Ok" : "Not Ok"
1 REPLY
Six Stars

Re: equal operator expression

You need to explicitly compare all 3 operands:

((row1.Base == row2.PL) && (row1.Base == row3.Loss))?"Ok" : "Not Ok"