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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mayer_stefan
Contributor
Contributor

WHERE multiple values

Dear all,

I had a look at similar postings, but I think I got a problem because of combined WHERE conditions.

Script is working:

LOAD
...
WHERE SALESORG I EQ '0001',
/BIC/ZDATARTK I EQ LS,
CALMONTH I EQ $(vYearMonth)
;

Now I want to load not only SALESORG 0001, but also 0002 and 0003 (and don´t load any others).
This one doesn´t work, because WHERE MATCH is also for the following lines?

LOAD
...
WHERE MATCH(SALESORG,'0001','0002','0003)',
/BIC/ZDATARTK I EQ LS,
CALMONTH I EQ $(vYearMonth)
;

What is a suitable way to adapt the script?
Thanks a lot!

Stefan

 

2 Replies
eliran
Creator III
Creator III

Hi,

 

I'm not sure if a typo or not, but your where looks a bit off, the last apostrophe is after the brackets, and not before.

Yours:

WHERE MATCH(SALESORG,'0001','0002','0003)',

The correct one

WHERE MATCH(SALESORG,'0001','0002','0003'),

mayer_stefan
Contributor
Contributor
Author

Hi,

thanks for your reply, and sorry that´s a typo.

LOAD
...
WHERE MATCH(SALESORG,'0001','0002','0003)',
/BIC/ZDATARTK I EQ LS,
CALMONTH I EQ $(vYearMonth)
;

What I mean is that these following lines still need WHERE instead of WHERE MATCH:
/BIC/ZDATARTK I EQ LS,
CALMONTH I EQ $(vYearMonth)
;

How to combine these conditions of WHERE MATCH and WHERE?