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

Which means that I want to find the parents who don't have children 46.

A great way to do this would be with a minus operator but that isn't supported. Or to add two queries to a temporary table then delete the duplicate records but I don't know how to do that either.

I hope this is clear I know it's confusing. But it's really slowing me down.

Joe

Reply via email to