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

Access 97 Need help with creating a select query

Status
Not open for further replies.

BCONNER

Programmer
Jun 9, 1999
2
US
I have names in two tables that I need to compare. I just need to print records where the names are different. The tables are linked on ID number. For example For ID1 I need to know if the name is different:<br>
Table 1 Table 2<br>
ID 1 Simth,John ID1 Smith,John M<br>
<br>
How would you create a query to do this?<br>
<br>
<br>
Thanks
 
SELECT Table1.ID1, Table1.Name, Table2.Name FROM Table1, Table2 WHERE Table1.ID1 = Table2.ID1 AND NOT (Table1.Name = Table2.Name);<br>
<br>
Will display the ID and Name from table 1 and the name from table 2 where they are different.<br>
<br>
Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top