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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"not equal" join?

Status
Not open for further replies.

lymi6977

IS-IT--Management
Jan 14, 2005
16
0
0
US
I have imported data where I need to strip out (exclude) certain records. I will then take those records to invoice from.

How could I do a "not equal" join?

Tables: tblMarchTransactions, tblPLSUserIDs

I basically need to see all fields in tblMarchTransactions, but I need to exclude any transactions where tblMarchTransactions.UserID = tblPLSUserIDs.UserID.

Suggestions?

Thanks for your help.
lymi6977
 
SELECT ...
FROM tblMarchTransactions [!]LEFT[/!] JOIN tblPLSUserIDs ON tblMarchTransactions.UserID = tblPLSUserIDs.UserID
WHERE tblPLSUserIDs.UserID IS NULL

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Do you also have tblFebruaryTransactions and tblAprilTransactions? Is there a valid reason for such a segregated structure? What do you do if you need yearly totals?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top