Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
aniruddhyadutta
Creator
Creator

Evaluate NULL values in a filed

Hi All,

I want to evaluate if a filed is NULL or not in a table and based on which I  want to assign a status in another filed in the table(like a flag)

//if (EVENT_COMMENT='-' ,'ACTIVE','HANDLED') as FINAL_ALERT_STATUS

    //if(len(trim("EVENT_COMMENT"))='0','ACTIVE','HANDLED') as FINAL_ALERT_STATUS

    //if(ISNULL(EVENT_COMMENT),1,0) as FINAL_ALERT_STATUS

     if(len(trim(EVENT_COMMENT))=0,'ani') as FINAL_ALERT_STATUS

I tried all the above options but nothing seems to work.Can someone plz help on this?

1 Reply
Gysbert_Wassenaar

if(len(trim(EVENT_COMMENT))=0,'ani') as FINAL_ALERT_STATUS

This looks basically correct to me. You might want to do something like this though:

if(len(trim(EVENT_COMMENT))=0,'ACTIVE','HANDLED') as FINAL_ALERT_STATUS


talk is cheap, supply exceeds demand