Tuesday, June 01, 2010

Access 2010 Delete Query

I try to create a query to delete unmatched records of two tables. SELECT query was OK, but then I convert it to DELETE and try to run, it give me the error: "Cannot delete from specified tables". So, I changed the property "Unique records" of the query to - 'Yes" and was able to run it. for reference my query was:
DELETE Invoice_detail.invoice, Invoice.*
FROM Invoice LEFT JOIN Invoice_detail ON Invoice.invoice = Invoice_detail.invoice
WHERE (((Invoice_detail.invoice) Is Null));

No comments:

Post a Comment