Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Null fields and or empty string and or ...

Q1:

When I pull data and I have a field and the field appears to be either Null, an empty string, or it has a few spaces in it, and when I use the script,

Where not IsNull([Field Name]) and Len(trim([Field Name])) >0 and it still does not delete those empty lines, what should I do to get rid of them?

Q2:  Then just by chance I did this with a resident load, trim([Field Name]) as [Field Name] and it deleted all the lines where Field Name was empty.  I did not have any code after that. How did this get rid of empty rows when I only told it to trim them, not delte them?  Maybe I am not understanding the use of trim or?  Any who, please answer both Q's so I can figure this out.  Many Thanks, Sean

1 Reply
prieper
Master II
Master II

WHERE LEN(TRIM([Field Name])) should do the selection.

Think that you need to specify the use of the NOT:

WHERE NOT(ISNULL([Field Name])) AND ....

should then work.

HTH
Peter