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

Syntax

Status
Not open for further replies.

Moose222

Technical User
Oct 18, 2001
13
US
I need to write a query that utilizes two tables, Table A and Table B. The column's that I need to query are Table A, SN and Table B SN2.

I need to check table A, Column SN against, Table B, SN2 Column for the same information. Both column's have Serial Numbers that have 13 digits, of both numbers and alphanumericas. Such as:

ABH1238743A11

Is there an easy way to write a query for this?

As usual any help would be appreciated.

Thanks,
Jim
 
Just use the find duplicates query wizard. It will walk you thru the process.
Good luck
 
Here is the SQL you need to accomplish your task:

SELECT TableA.SN
FROM TableA INNER JOIN TableB ON TableA.SN = TableB.SN2;

It doesn't get much easier than that. Just add any other fields you require from TableA and/or TableB to the SELECT clause e.g.

SELECT TableA.SN, TableB.Field2, TableB.Field3

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top