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

Cleaner WHERE Clause

Hi, 

My question is hopefully a basic one regarding having less script to get to the same thing.  Currently I am doing the following

Load *;

From TableA

WHERE OrderType = "A" AND OrderClass = 71

OR OrderType = "A" AND OrderClass = 85

OR OrderType = "A" AND OrderClass = 91;

Is there a simplier way to write this i.e. in SQL it would be something like

WHERE OrderType = 'A' AND OrderClass IN (71, 85, 91)

Many thanks

C

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

Load *;

From TableA

WHERE OrderType = "A" and match(OrderClass,71,85,91)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

HI

Try like this

Load *;

From TableA

WHERE OrderType = "A" and match(OrderClass,71,85,91)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

     *

FROM TableA

WHERE OrderType = "A" AND Match(OrderClass, 71, 85, 91);

The match() in Qlikview will act similarly like In in SQL.  Also you have different variants of Match() like Mixmatch() and WildMatch().

Hope it helps you.

Regards,

Jagan.