Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem "where not" statement sql

I'm writing a very simple query, which unexpectedly is giving me headache:

concatenate (Temp) load * from '$(ArchiveFile)' (qvd)

where not (YearQtr = '$(LoadQtr)' and Scenario = '$(LoadScenario)')

I expected NOT to see only those records, which satisfy both conditions of there where statement. But as a result I see nothing at all. Tried trimming the variables, but to no avail.

To narrow down the problem, the following two "where" statements give me different results. Why?

1) where not (YearQtr = '$(LoadQtr)')

2) where YearQtr <> '$(LoadQtr)'

Thank you!

1 Reply
Not applicable
Author

I tried the same splitted where conditions with sample data ,it worked perfectly for me. Probably can you recheck your data again. But the splitted where conditions is correct.

Pls post the sample data if the issue is not resolved.