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!

How to find/display unmatched records 1

Status
Not open for further replies.

tmssales

IS-IT--Management
Jan 29, 2004
4
US
Hi folks,

I have 2 tables, contact1 and contact2. Each table has an accountno field. I have 55000 records in contact and 69000 records in contact2. There are 14000 records in contact2 that do not have an associated accountno in contact1. I need to be able to display these 14000 records. Can some one help me with a query here?

I have tried several select versions using left and inner joins to no avail.

Thanks for any help.
 
Code:
select * from contact2
where accountno not in (
select accountno from contact1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top