Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17884

Multi WHERE Clause: (OR) AND

$
0
0

Hi,

 

This a way to apply an OR in the filter conditions? Or adding an embedded where clause?  The tool already applies ANDs between filters but not ORs

 

EX: (I figured out how to union the two tables, but how do I add the where clauses to the individual data sets?)

SELECT * 

FROM [Table A]

WHERE (region in ('America', 'Europe' OR team = 'testing')

              AND date > '2017-01-01'

 

UNION 

 

SELECT * 

FROM [Table B]

WHERE (region in ('AM', 'EU' OR team = 'TEST')

              AND date > '2017-01-01'


Viewing all articles
Browse latest Browse all 17884

Trending Articles



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