Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 exclusion

Author  Topic 

nbs
Starting Member

22 Posts

Posted - 2007-03-26 : 11:06:08
How do I achieve

A - (A intersection B) in SQL....

I want to exclude all data from the first dataset that has a match on the second.

any ideas?

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-26 : 11:09:41
Use technique described here to mimic the INTERSECT and MINUS operator for your case.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

nbs
Starting Member

22 Posts

Posted - 2007-03-26 : 12:15:36
I guess that would work but my A and B are really not tables... they are two big select statements with multiple joins between tables. and I am not able to understand how I could do the "WHERE O.OrderID = R.OrderID" as shown in the link that you gave me.

Go to Top of Page
   

- Advertisement -