Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset1 not equal to Recordset2 2

Status
Not open for further replies.

Deenuts

IS-IT--Management
Oct 16, 2009
2
IE
I have two tables namely:

Recordset1 - Primary Key UserID
Recordset2 - Primary Key UserID

I need to select records from Recordset1 where UserID is not equal to UserID in Recordset2.

I have tried to execute this query using <> operator but it does not run. I have also tried !=.

At one point the query returned results where UserID is the same.
 
A starting point (SQL code):
Code:
SELECT A.*
FROM Recordset1 A LEFT JOIN Recordset2 B ON A.UserID = B.UserID
WHERE B.UserID IS NULL

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top