All Forums Analytics
az_maverick 22 posts Joined 03/09
30 Mar 2009
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

prodanlu 2 posts Joined 06/09
27 Jun 2009

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

Jimm 165 posts Joined 09/07
28 Jun 2009

Just switch INTERSECT set operator to MINUS

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

You must sign in to leave a comment.