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"
精彩评论