Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Afternoon,
I am experiencing issues when creating flags where many of them are nulls for no apparent reason:
In the Script:
Trim(Upper(Status)) as Status,
If(Trim(Upper(Status))='INACTIVE',0,If(Trim(Upper(Status))='TERMINATED',0,If(Trim(Upper(Status))='ON HOLD',0,If(Trim(Upper(Status))='ON LEAVE',0,If(Trim(Upper(Status))='RESIGNED',0,1))))) as Active_Flag,
if(Trim(Upper(Status))='TERMINATED',1,0) as Terminated_Flag
Output:
As you can see, the for the inactive it is null in one place but is working correctly in another. The if statement is basically the same for the terminated flag, but it is coming through fully with no nulls.
Please let me know if you have any ideas!
Thanks,
Erica
May be change the logic other way round.. try
IF(Trim(Upper(Status))='FULL-TIME',1,0) as Active_Flag
I load one other table but this is my layer 2 so I drop it. This one table is the only one that is in the Data Model Viewer
I tried the reverse flag but it still has nulls
Hi Erica,
can you maybe attach whole script of this app? I'm running out of ideas (contact support being the last idea).
Juraj