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

Selecting records based on value in 2nd table

Status
Not open for further replies.

Pbjmam

Technical User
Jan 13, 2003
23
0
0
US
I have 2 tables. One contains items received on invoices. The second contains items that have been approved to be purchased.

Table1

Vendorid ItemID Description UOM UnitPrice

67374 5504C Forks CS 22.34

Table 2

VendorName Vendorid ItemID Item Desc


I am trying to select only records Table1.ItemID not in Table2.itemID where table1.Vendorid = Table2.vendorid.

The sql query would look like:

select Distinct IsysProd.VendorName, IsysData.VendorID, IsysData.ItemID, IsysData.ItemDesc, IsysData.Uom, IsysData.UPrice
from IsysData left Join IsysProd
On IsysData.VendorID = IsysProd.VendorID where
IsysData.ItemID not in
(Select IsysProd.ItemID from iysProd)


I am unable to determine the Record selection formula to get these results.

thanks

pbjmam
 
Never mind. I figured it out.

Thanks

pbjmam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top