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

Not Equal to

Status
Not open for further replies.

jiayue

MIS
Feb 7, 2004
9
0
0
CN
I am joning these 2 tables with [Product Code] to [Product No] in a query. Question is : how can I retrieve those [Product Code] which is not equeal to [Product No]?

I believe I need to use a SQL to relate it but how is it? Is it Not equal To or <>, I had tried both but fails....

Please teach.

Thnaks

jiayue
 
do a left join then look for nulls
SELECT Table1.[Product Code], table2.[Product no]
FROM Table1 LEFT JOIN table2 ON Table1.[Product Code] = table2.[Product NO]WHERE (((table2.[Product Code]) Is Null));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top