MySQL Forums
Forum List  »  Stored Procedures

Updating a field in a stored procedure
Posted by: Geo Barreros
Date: September 05, 2012 11:57AM

Hello all,
I am trying to include a sql statement that works flawlessly when executed on its own to a stored procedure. However when inserted in a stored procedure it throws a Error Code: 1242. Subquery returns more than 1 row

Here is the sql statement
UPDATE oc_product_description_temp SET product_id=(SELECT product_id FROM oc_product WHERE sku=<somevalue>);

I have run this query and it returns a single value. If anybody can provide some insight on to what might be going on I would really appreciate it.

Cheers!

Options: ReplyQuote


Subject
Views
Written By
Posted
Updating a field in a stored procedure
2271
September 05, 2012 11:57AM
1220
September 08, 2012 12:21PM


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.