开发者

How to make a delete query in design view

please supply me with the correct SQL in order to delete all records from the table "SYSADM_DISCOUNT_PRICE" where "[SYSADM_DISCOUNT_PRICE].[PART_ID]" equals "[tblPartsWithBadDefaultPrice].[PART_ID]" and where SYSADM_DISCOUNT_PRICE.DISCOUNT_CODE equals "STANDARD".

thank you very much and happy holidays!

DELETE SYSADM_DISCOUNT_PRICE.DISCOUNT_CODE, SYSADM_DISCO开发者_Python百科UNT_PRICE.PART_ID FROM SYSADM_DISCOUNT_PRICE INNER JOIN tblPartsWithBadDefaultPrice ON SYSADM_DISCOUNT_PRICE.PART_ID = tblPartsWithBadDefaultPrice.PART_ID WHERE (((SYSADM_DISCOUNT_PRICE.DISCOUNT_CODE)="STANDARD") AND ((SYSADM_DISCOUNT_PRICE.PART_ID)=[tblPartsWithBadDefaultPrice].[PART_ID]));


Don't know about "MS Access Design View", but this is the SQL you need:

DELETE FROM 
  SYSADM_DISCOUNT_PRICE
WHERE 
  PART_ID IN (SELECT PART_ID FROM tblPartsWithBadDefaultPrice) AND
  DISCOUNT_CODE = "STANDARD"
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜