469,625 Members | 1,080 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Simulating MINUS Operator

Joe
Hello,

Hopefully you sql guru's can help me out a bit. :)

Here is the short example of what I want to accomplish. I wish to
have the difference between two different select queries.
So if one query pulls records 1,2,3 and 4 and the second pulls records
1 and 4 I wish to have only the records 2 and 3. How can I accomplish
this easily.

In case that doesn't make sense here is the long version.
I have two tables that are keyed together through an id field. However
this is not a one to one relationship, it is a one to many
relationship. The following is an example of the table

Table 1 Table 2
------------------ ----------------
ID relid rid vid

Table 1 and table two are linked through the columns id and rid. There
can be many links between id and rid so the link is further refined
through a vid field. What I need is all records in table 1 that will
not link to table 2 such that relid=rid and vid=46

I hope this is clear I know it's confusing.

Joe
Jul 19 '05 #1
0 3043

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Andrew Ward | last post: by
2 posts views Thread by Newbie | last post: by
13 posts views Thread by Marc | last post: by
19 posts views Thread by mantrid | last post: by
6 posts views Thread by Matthew Cook | last post: by
7 posts views Thread by =?Utf-8?B?VG9tIEJvbWJhZGls?= | last post: by
2 posts views Thread by CenturionX | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.