开发者

delete query error message:"could not delete from specified tables"

开发者 https://www.devze.com 2023-04-11 00:20 出处:网络
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:\"cou

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消