Except operator in Access 2003

G

Guest

I am trying to formulate a SQL statement to look for values present in one
list but NOT present in another list, almost like the "find unmatched query"
wizard except that the result from the wizard will not show if there are more
values in one list than in anther. Let's say we have table A with entries
(a,b,b,b,c) and table B with entries (a,b,b), I would like the result to be
(b,c), where as the wizards solution would only give me (c).

I have tried to write this using the EXCEPT operator
(http://www.databasejournal.com/features/mssql/article.php/3602601) but it
does not seem to be work.

Basically, what I want to do is to take the set in table A minus the
intersetion of A and B.
 
B

bjartnes

A short comment.
The "opposite" of what I am trying to do workds in ACCESS, that is
SELECT * FROM A
UNION ALL SELECT * FROM B;
where as what I would do is something like MINUS or EXCEPT, which does
not work (syntax error).

BEB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top