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.
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,A5and the user is using A1 and A2the 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 itI should be comparing the stringssomeone told me to use a left outer join and I used the following code that returns nothinghere it goes the code:"SELECT Badges.BadgeReferenceFROM Badges Left Outer Join Visitors On Badges.BadgeReference = Visitors.VisitorReferenceWHERE 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] |
 |
|
|
|
|