Quote:
|
Originally Posted by Pat Phelan
The VALUES clause implies proving contants while the FROM clause implies copying elements from existing tables. You can't have both, so drop the VALUES clause and its parens and you should be closer. Without knowing what you really intended to do, this is only a guess, but it ought to get you started.
-PatP
|
I've tried removing the values clause but i still get the same error.
Instead i've added the following to the end of the on duplicate update clause:
on duplicate key update PD_Name=PD_Name
It seems to work with that. I dont understand why though? I'm not sure if its producing correct results as yet - it needs some more testing.
Basically i want to add values to the product_names table from a supplier_products table. If the name for that product is already in that table I want to simply update using the above on duplicate update clause.
The PD_ID and PD_Name is a compound primary key in the product_nmaes table with PD_ID bieng a foriegn key from the products table.