MySQL Forums
Forum List  »  Stored Procedures

Re: Error Code: 1172. Result consisted of more than one row INSIDE A FUNCTION
Posted by: Peter Brawley
Date: March 05, 2022 08:19PM

Your function does not appear restrict the result to one date. You need something like ...

create function `euro`(fec date ) returns decimal(11,2)
return ( select euro from data.iym where doer=@hoy and date=fec );

When building a query into an sproc or function, save yourself such hassle by always furst testing the query outside the routine.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Error Code: 1172. Result consisted of more than one row INSIDE A FUNCTION
111
March 05, 2022 08:19PM


Sorry, only registered users may post in this forum.

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.