Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello..
I have data in my LOAD statements, where one Employee have a value while another has not any records about it.
How can I convert null() values to 0
I have tried the LOAD statement bollow, but it doesn't help.. one employee still has "-" value instead of 0
Load
Employee,
IF(Coffee_Rent = null(),0, Coffee_Rent) AS Coffee_Rent
RESIDENT Another_Table.
Try this way?
If(Not IsNull(Coffee_Rent), Coffee_Rent, 0) AS Coffee_Rent
Or
If(Len(Coffee_Rent)>0, Coffee_Rent, 0) as Coffee_Rent
Is That Real Null Value? May be Use IsNull function like
IF(Coffee_Rent = null(), If(IsNull(Coffee_Rent),0, Coffee_Rent)) AS Coffee_Rent
Hi,
try this:
Load
Employee,
IF(len(trim(Coffee_Rent))=0,0, Coffee_Rent) AS Coffee_Rent
RESIDENT Another_Table.
Hi Ruslans,
You can try like this also,
Load
Employee,
IF(len(trim(Coffee_Rent)) = 0,0, Coffee_Rent) AS Coffee_Rent
RESIDENT Another_Table.
Br,
KC
Hello!
Qlick says to me that TRIM is not recognized built-in funcion
I've got incorrect syntax erro, need to show 2 parameters
Try this way?
If(Not IsNull(Coffee_Rent), Coffee_Rent, 0) AS Coffee_Rent
Or
If(Len(Coffee_Rent)>0, Coffee_Rent, 0) as Coffee_Rent
I think it is because you are using a sql statement;
try like this if that is the case.
Load
Employee,
IF(len(trim(Coffee_Rent)) = 0,0, Coffee_Rent) AS Coffee_Rent;
SQL select
*
from table;
Br,
KC
Hi,
You could look at the null as value function.
Mark
Unfortunatelly, both cases are not working