Patrick O'Dea
asked on
SQL - Insert Where Not Already Exists
Hi,
Struggling with my SQL again,
I am loading new data into tblPrices from tblPasteForLoad
The tblPrices table has a compound key consisting of SupplierID and ProductCode.
INSERT INTO tblPrices (SupplierID, ProductCode)
SELECT SupplierID,ProductCode from tblPasteForLoad
WHERE
tblPasteForLoad.SupplierID & tblPasteForLoad.ProductCod e
NOT EXISTS IN tblPrices
Hopefully the above 5 lines of pseudo SQL will indicate the SQL I actually require.
Thankyou!
Struggling with my SQL again,
I am loading new data into tblPrices from tblPasteForLoad
The tblPrices table has a compound key consisting of SupplierID and ProductCode.
INSERT INTO tblPrices (SupplierID, ProductCode)
SELECT SupplierID,ProductCode from tblPasteForLoad
WHERE
tblPasteForLoad.SupplierID
NOT EXISTS IN tblPrices
Hopefully the above 5 lines of pseudo SQL will indicate the SQL I actually require.
Thankyou!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Angel with 4 l's!
Just perfect!
Just perfect!
Open in new window