Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I have a column with this possible values:
N/A
0
1
I want it as an INT, so I have to transform this N/A values... I already have this code in the tmap:
row1.XXX.equals("N/A")?0:1
How would be the real code to transform this N/A to 0 and convert the column to int? THANKS YOU
if row1.XXX is a string check it's not null or empty first
(!Relational.ISNULL(row1.XXX) && !"".equals(row1.XXX)?row1.XXX.equals("1")?1:0:0)
However, that error you're getting makes me think that either row1.XXX is not a string in tMap or that the out row is not set to Integer.
Hi! In your code how can i put the "N/A" string?
Because the error still persist here for the "N/A" in an int column. I wanna say if the columns has null, blank or N/A = 0, else 1.
Thanks!