Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where clause removing NULL values

Hi

I am having a problem whereby I am using a Where clause to exclude any products that have their product description marked as EXCLUDED but the problem is that the where clause is also excluding any new products that have not yet been allocated...so they have NULL values as their product description.

Does anyone have any suggestions of how to stop that from happening?

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

LOAD *

FROM ...somewhere...

WHERE [Product description] <> 'EXCLUDED' or len(trim([Product description])) = 0;


If you're using an sql statement you probably need something like

SELECT *

FROM ...somewhere...

WHERE "Product description" <> 'EXCLUDED' or "Product description" IS NULL;


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

LOAD *

FROM ...somewhere...

WHERE [Product description] <> 'EXCLUDED' or len(trim([Product description])) = 0;


If you're using an sql statement you probably need something like

SELECT *

FROM ...somewhere...

WHERE "Product description" <> 'EXCLUDED' or "Product description" IS NULL;


talk is cheap, supply exceeds demand
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

I don't know if you are talking about a where using sql or a load. But I think you could use something like

where (len(description)=0 or match(description,'EXCLUDED')<>1)

If it is an sql then you have to change the clauses using is null

where (description is null or description<>'EXCLUDED' )

Colin-Albert
Partner - Champion
Partner - Champion

Can you post the section of your script with the where clause. That will help to give you the correct answer.

Not applicable
Author

Thanks that worked