I am trying to use design-view to create a delete query, to delete all records from table "S", if table "V" contains the same record for "tracking number", but am getting the error message:"could not delete from specified tables". Please give me the proper SQL to copy and 开发者_开发问答paste because I dont know SQL. Please modify my SQL code below. Thank you very much in advance.
DELETE S.*FROM qryVoidedUPSshipments AS V INNER JOIN tblShipmentDataFromAllCarriers AS S ON V.PackageTrackingNumber = S.tracking_number;
Here is your SQL:
DELETE S.*, S.tracking_number
FROM tblShipmentDataFromAllCarriers AS S
WHERE S.tracking_number In (select PackageTrackingNumber From qryVoidedUPSshipments AS V Where V.PackageTrackingNumber = S.tracking_number)
精彩评论