Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: IN statment

$
0
0

Your question (or English) was a bit vague, but here goes:

 

If you want just c_3 and c_13's returned

 

SELECT id,condition_id,property_id

FROM table

WHERE condition_id = 'c_3' OR condition_id = 'c_13'

 

But it seemed you wanted to filter out the results further by having only c_3 and c_13's which also match b_1 or b_2

 

SELECT id,condition_id,property_id

FROM table

WHERE (condition_id = 'c_3' OR condition_id = 'c_13')

AND (property_id = 'b_1' OR property_id = 'b_2')

 

Alternatively,

 

SELECT id,condition_id,property_id

FROM table

WHERE condition_id IN ('c_3,'c_13')

AND property_id IN ('b_1','b_2')

 

-Fernis


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>