Generate errors for intersection of queries

Analytics
Enthusiast

Generate errors for intersection of queries

How do i generate a error ,when a set of records ina query do not intersect a set of records in another query.
For eg,
if I have a query ,

select A,b from ABC
INTERSECT
select B,d from XYZ

I want to display all records in ABC which do not intersect the b,d in XYZ.
What logic do I use ?

Thank you,
az_maverick
2 REPLIES

Re: Generate errors for intersection of queries

Hello,

I want to display all records in ABC which do not intersect the b,d in XYZ.
What logic do I use ?

very simple with one field, try this

select A,b from ABC where b not in ( select d from XYZ)

bye
Enthusiast

Re: Generate errors for intersection of queries

Just switch INTERSECT set operator to MINUS

select A,b from ABC
MINUS
select B,d from XYZ
;
.If ActivityCount > 0 Then .Quit 99