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!

Help with Query

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Hi Folks,

I have two tables - Part Master and Product Structure. The PRTNUM_01 field in the Part Master table is the same as the PARPRT_02 field in the product structure table.

I want to run a query that will give me all the values from "Part Master".PRTNUM_01 that are not in "Product Structure".PARPRT_02

Any suggestions?

Mighty
 
Hi,

You can use the NOT IN clause in your select. This is an example from the manual.

SELECT * FROM Person p WHERE p.id NOT IN
(SELECT s.id FROM Student s WHERE Cumulative_Hours = 0)

Regards,
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top