Delete Query

paulS30berks

Registered User.
Local time
Today, 11:25
Joined
Jul 19, 2005
Messages
116
Can anyone help?

i have set up the delete query:

DELETE dbo_MP_Audit.*, dbo_CAD_SINV_HEADER.SIN_CANCELLED_YNF
FROM dbo_MP_Audit INNER JOIN dbo_CAD_SINV_HEADER ON (dbo_MP_Audit.Usr = dbo_CAD_SINV_HEADER.USR_CODE) AND (dbo_MP_Audit.Sin_DocNum = dbo_CAD_SINV_HEADER.SIN_NUMBER) AND (dbo_MP_Audit.company = dbo_CAD_SINV_HEADER.CMP_CODE)
WHERE (((dbo_CAD_SINV_HEADER.SIN_CANCELLED_YNF)=1));

but receiving error message: "could not delete from specified tables".
 
You are getting this error because of the table relationships. CAn you post you database?
 
Unfortunately I cannot post the database.

I just have 2 tables and as far as I am aware there are no further relationships in table dbo_MP_Audit.
 
Its ok. forgot to amend UniqueRecords property of the query to Yes
 

Users who are viewing this thread

Back
Top Bottom