1

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;

1 Answer 1

2

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)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.