문제

I am trying to run a delete query for all records in table 'CSD' that are not available in table 'Client Codes for dealing'. I am getting an error 'Could not delete from specified tables'

DELETE CSD.*
FROM CSD LEFT JOIN [Client Codes for dealing] ON CSD.CLIENT = [Client Codes for     dealing].ClientCode
WHERE ((([Client Codes for dealing].ClientCode) Is Null));
도움이 되었습니까?

해결책

In your comment you mentioned that [Client Codes for dealing] is a Union query. Anytime a UNION query is involved, the entire query is made read-only (see Why is my query read-only?).

The simplest thing to do is to turn your UNION query into a make-table query, then replace the name of the UNION query with the name of the temporary local table created by the make-table query.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top