Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
In my script, I write an IF statement and I save the result in a new column.
But I don't understand why after to run the script I get none value for the column created.
AMOUNT:
LOAD *,
IF(LEN(Type)=0,Credit,Debit) as test
RESIDENT JOURNAL;
Please could you help me to resolve this problem.
Thank you in advance for your help.
Can you add a new column as LEN(Type) just to check the values you for the newly added column.
Only other thing that came to mind for me was if you aliased Type in the original load statement and are using the original field name not the alias? Highly unlikely, but I wanted to toss it out there just in case.
Regards,
Brett
Bonjour,
If(LEN('Type')=0, 'Credit', 'Debit') as test
... perhaps ?
if(len(Type)='0', Credit, Debit) as test
maybe like that