MySQL Forums
Forum List  »  Stored Procedures

Re: Updating a field in a stored procedure
Posted by: Geo Barreros
Date: September 05, 2012 02:58PM

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.

Options: ReplyQuote


Subject
Views
Written By
Posted
2287
September 05, 2012 11:57AM
1224
September 08, 2012 12:21PM
Re: Updating a field in a stored procedure
1410
September 05, 2012 02:58PM


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.