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

Comparing two tables 1

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
I have a table with a load of fields - one being 'Project ID'.

another table I have is a project tabe, also containing 'Project ID'

I want to be able to write a query that tells me which Project ID's in table 1 are NOT in table 2.

how can this be achieve????


 
One solution:

SELECT * FROM TABLE1 WHERE PROJECTID NOT IN (SELECT PROJECTID FROM TABLE2)



Leslie
 
hmmm, why didn't I think of that....
 
probably that forest ~ tree thing!

thanks for the star

les
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top