Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Change a MINUS set operation to JOINS?

user13117585Feb 1 2012 — edited Feb 2 2012
Hi guys,

I have a question about an SQL statement that I have to do. The complexity is big (lots of tables), but the problem can be resumed to this. Imagine I have the following query:
SELECT t.x 
  FROM the_table t 
 WHERE t.y = 'a'
MINUS 
SELECT t.x 
  FROM the_table t 
 WHERE t.y = 'b'
In my original statement, I don't have only one table but many. But the issue is the same. I select a set of data and I minus the same statement with another criteria. I tried with some OR combination but never had the same result...

Does anyone have an idea?

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 29 2012
Added on Feb 1 2012
6 comments
661 views