Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
>> If there is a text value In Column 2 (other than '-' or Null), value in Column 2 should be displayed as output.
>> If Col 1 has value and Col 2 is Null or '-', value in Col 1 should be displayed as o/p.
>> If Col 1 and Col 2 both has text value. text in Col 2 should be displayed as o/p
Logic Used: if ("Col 1" = '-' or len(trim("Col 1")) = 0, "Col 2", "Col 1" )
Note: Above if Condition requires modification.
@tsachdev421 if I understood correctly
you can use this :
load *,if(len(trim([Column 2]))>0,[Column 2],if(len(trim([Column 1]))>0,[Column 1])) as output;
load replace([Column 1],'-','') as [Column 1] ,replace([Column 2],'-','') as [Column 2] inline [
Column 1,Column 2
Text1,Text2
Text3,
Text4,-
Text5,Text6
Text7,-
Text8,Text9
-,Text10
-,-
]
output:
How about:
Coalesce([Column 2], [Column 1])
-Rob