October 25, 2005 at 12:36 am
Ladies / Gentlemen
Here is the Delete statement that I would like to emulate, but I need to do it with a multipart key.
Delete from TableA
where TableA.ID
in ( Select TableB.Id from TableB )
The Four part key consists of the following fields
StoreId int
VendorNumber int
ItemNumber char(15)
PLUNumber bigint
So I need to match
TableA.StoreID : TableB.StoreID
TableA.VendorNumber : TableB.VendorNumber
TableA.ItemNumber : TableB.ItemNumber
TableA.PLUNumber : TableB.PLUNumber
Thanks in advance
Mark Moss
October 25, 2005 at 1:03 am
DELETE FROM TableA
WHERE EXISTS (
SELECT *
FROM TableB
WHERE StoreID = TableA.StoreID
AND VendorNumber = TableA.VendorNumber
AND ItemNumber = TableA.ItemNumber
AND PLUNumber = TableA.PLUNumber)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply