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: 
Drece-gkn
Contributor III
Contributor III

WHERE clause for multiple values

Hello I have an app that I am making adjustments to. In the script we have a Where clause that says WHERE "Material Number" = 'x' (Made up material number as I can show those). I want to change this to include more Material Numbers. So I want the clause to say WHERE "Material Number" = 'x','y','z' but commas give me an error. What is the proper way to write this clause?

Labels (1)
2 Solutions

Accepted Solutions
Clement15
Partner - Specialist
Partner - Specialist

Hello,

 

I don't know if this is the most optimized way, but you can do this.

 

WHERE "Material Number" = 'x' or "Material Number" = 'y' or "Material Number" = 'z'

 

View solution in original post

Anil_Babu_Samineni

Perhaps I may do this WHERE Match("Material Number", 'x', 'y', 'z')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Clement15
Partner - Specialist
Partner - Specialist

Hello,

 

I don't know if this is the most optimized way, but you can do this.

 

WHERE "Material Number" = 'x' or "Material Number" = 'y' or "Material Number" = 'z'

 

Anil_Babu_Samineni

Perhaps I may do this WHERE Match("Material Number", 'x', 'y', 'z')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
anat
Master
Master

where match(Material Number,'x','Y','Z')