Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
Honored Contributor II

Null fields and or empty string and or ...

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