Skip to main content
GameDev.net gamedev.net
🔒 Locked

SQL Query

Started by Last Attacker Feb 16, 2005 at 11:23 PM 2 replies 650+ views
Original Post
Last Attacker
Last Attacker
Hello! I'm having trouble with performing a query in MS Access. The thing is, Access doesn't support the Diffrence operator (like Union, join, etc.) to take elements from table B, match them to table A and to result only the elements of table A that is not found in B. How can I perform something like that with using basically SELECT statements? I have tried:

SELECT [TableA].[COL]
FROM TableA, TableB
WHERE [TableA].[COL] <> [TableB].[COL];

... But it doesn't work. Thanks
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog
Last Attacker
Last Attacker
A friend of mine, said that I could probably use the JOIN operation. But I'm just still having trouble getting it right.

EDIT : I don't know anymore. Please can someone help? I don't think the JOIN is going to work.

[Edited by - Last Attacker on February 17, 2005 1:29:21 AM]
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog
Neil Kerkin
Neil Kerkin
Try

SELECT [TableA].[COL]FROM TableA  WHERE [TableA].[COL] not IN (SELECT [TableB].[COL] FROM [TableB]);


btw Access does support union queries, just not in the query designer (the SQL statement will work fine)
Last Attacker
Last Attacker
Thanks a lot man! Extra points for you! ;)
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.