Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a small requirement where I need to compare 2 numbers and get the results, let’s say my input is like below
col1;col2
1;2
2;2
3;2
my output should be like
cok1;col2;results
1;2;1
2;2;0
3:2;-1
if 2 numbers are same it should return 0 , greater -1 and lesser +1
i tried using methods like greater or greaterorequal but not getting the exact results
can anyone suggest other methods
thanks,
lmit
Hi
Add a new column in the output table on tMap, and set its expression like this:
row1.col1==row1.col2?0:(row1.col1>row1.col2?-1:1)
Regards
Shong
Hi
Add a new column in the output table on tMap, and set its expression like this:
row1.col1==row1.col2?0:(row1.col1>row1.col2?-1:1)
Regards
Shong
Thanks @Shicong Hong ,