I have two tables: Deliveries and Invoices. An Invoice can relate to a
number of Deliveries.
The relevant fields are:
Invoices:
InvoiceID
InvoiceDate
Deliveries:
DeliveryID
DeliveryDate
InvoiceID
Sometimes deliveries are cancelled and so the associated invoice may
need to be deleted. I tried to run the following query:
Delete * From Invoices Left Join Deliveries On Invoices.InvoiceID =
Deliveries.InvoiceID Where Deliveries.InvoiceID Is Null
i.e. attempting to remove all Invoice records which do not have any
associated Delivery records.
However I get the error message:
"Could not delete from specified tables"
What is going wrong?
How can a I achieve this?
Ron
PS if I make the query into a Select query, it displays just the
records I wish to delete!