Hi there,
I am trying to get the SQL right for a Delete Query I am trying to run on a table and am not being very successful.
Basically, I have two tables:
Table1 - Items
-----------------
Primary Key: ItemID
AdditionalField: ItemNumber (type: String)
Table2 - Prices
-----------------
Primary Key: CustomerPriceID
Foreign Key: ItemID (from Items table)
I want to delete a specific record/s from the Prices table, based on an ItemNumber parameter entered by the user.
My query is as follows:
DELETE * FROM tblPrices INNER JOIN tblItems ON tblPrices.ProductID = tblItems.ItemID WHERE tblItems.ItemNumber = USERPARAMETER
but I am getting a runtime Error (3083) when run in MS Access.
I don't want to delete anything from the Items table, just the Prices table.
Any advice?
Thanks
Rael