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
2303
September 05, 2012 11:57AM
914
September 05, 2012 01:35PM
1026
September 05, 2012 02:13PM
954
September 05, 2012 02:54PM
890
September 05, 2012 03:46PM
977
September 07, 2012 01:01PM
1228
September 08, 2012 12:21PM
Re: Updating a field in a stored procedure
1416
September 05, 2012 02:58PM
967
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.