Re: Updating a field in a stored procedure
Here is the complete procedure, I figure it might help to see if I am doing something wrong besides the sql statement.
DELIMITER $$
DROP PROCEDURE IF EXISTS DuplicateProduct$$
CREATE PROCEDURE DuplicateProduct()
BEGIN
UPDATE oc_product_description_temp SET product_id=(SELECT product_id FROM oc_product WHERE sku='sku19');
END$$
DELIMITER ;
The Select statement returns only a single product_id value. The UPDATE statement updates multiple rows, but don't think that is the problem because I replaced the Select statement with a statci value and it worked without a problem. Again, this sql statement runs flawlessly outside the store procedure.
Subject
Views
Written By
Posted
2293
September 05, 2012 11:57AM
912
September 05, 2012 01:35PM
1022
September 05, 2012 02:13PM
948
September 05, 2012 02:54PM
888
September 05, 2012 03:46PM
975
September 07, 2012 01:01PM
1224
September 08, 2012 12:21PM
Re: Updating a field in a stored procedure
1413
September 05, 2012 02:58PM
964
September 05, 2012 03:01PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.