Generate error for intersection of queries

Database
Enthusiast

Generate error 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
1 REPLY

Re: Generate error for intersection of queries



Hi

Method 2
----------
select A,b from ABC
minus
select B,d from XYZ
will give all the records from ABC that do not match with XYZ.

Method 1
----------
select B,d from XYZ
minus
select A,b from ABC
will give all the records from XYZ that do not match with ABC.

--> in both minus and intersect all the redundancy will be eliminated.

I dont know what you mean by " How do i create an error ? "

Sorry, if my answer do not answer your question........

---------------------------------------------------------------------------------------------------------------------------
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