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
 Other Forums
 MS Access
 Retrieve not used references

Author  Topic 

Santal_Maluko
Starting Member

14 Posts

Posted - 2005-01-28 : 05:45:17
Greets to y'all!

I have a table with badges wich have a reference and a table with users that use those references...

I want to retrieve the references that users are not using!

like this
I have references
A1,A2,A3,A4,A5
and the user is using A1 and A2

the result should be something like this:
A3,A4,A5.

I tryied many ways but it never works does someone have an ideia in how can I do it

I should be comparing the strings

someone told me to use a left outer join and I used the following code that returns nothing
here it goes the code:

"SELECT Badges.BadgeReference
FROM Badges Left Outer Join Visitors On Badges.BadgeReference = Visitors.VisitorReference
WHERE Badges.BadgeReference <> Visitors.VIsitorReference"

Thanks in Advance!

Diogo Alves

jhermiz

3564 Posts

Posted - 2005-01-30 : 21:57:17
SELECT BadgeID, Badge
FROM Badges WHERE BadgeID NOT IN (SELECT Users.BadgeID FROM Users)



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page
   

- Advertisement -