这是我要运行的代码:
DELETE DISTINCTROW JHALL_REFERAL_ASSIGNMENTS.emp_id, JHALL_REFERAL_ASSIGNMENTS.ref_elem_id
FROM JHALL_REFERAL_ASSIGNMENTS
WHERE (((JHALL_REFERAL_ASSIGNMENTS.emp_id)=(select b.emp_id from JHALL_REFERAL_ELEMENT a, JHALL_REFERAL_ASSIGNMENTS b, BSI_MARTS_D_EMPLOYEE c
where C.FULL_NM = 'Employee'
and A.REF_NAME ='Max Premium of 5,000'
and A.REF_ELEM_ID = B.REF_ELEM_ID
and B.emp_id = C.EMPLOYEE_KEY
)) AND ((JHALL_REFERAL_ASSIGNMENTS.ref_elem_id)=(select a.ref_elem_id from JHALL_REFERAL_ELEMENT a, JHALL_REFERAL_ASSIGNMENTS b, BSI_MARTS_D_EMPLOYEE c
where C.FULL_NM = 'Employee'
and A.REF_NAME ='Max Premium of 5,000'
and A.REF_ELEM_ID = B.REF_ELEM_ID
and B.emp_id = C.EMPLOYEE_KEY
)));
每次我尝试在 Access 中运行它时,都会收到错误 3086,“无法从指定的表中删除”。在尝试在线查找信息时,我不断遇到解决方案,说我应该将唯一记录字段更改为“是”,我这样做了,但这并没有解决我的问题。我在 Toad 中运行了相同的代码(用.
而不是分隔模式和表名),它运行良好。_