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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using an if statement inside 'where'

HI i need a little help here.

Basically I have a variable called owner and I want to use this inside a where clause, however I only want to include this if there is something inside the variable.

At the minute I am using this which is including it regardless of whether there is anything inside owner or not.

     FROM REP_TASK_NF WHERE CANCELLED_DATE = '' AND OWNER = '$(owner)'

I need it to only use owner if it IS NOT NULL, how do i do this?

Thanks

10 Replies
Not applicable
Author

That all works ok. Thanks for your help.