Comments - SET Variable

8 years, 7 months ago Adrian Hastro

I Have 2 Function: 1. GETAMOUNT(param1,param2); 2. GETCALCULATE(param1,param2); /* GETCALCULATE */ CREATE FUNCTION GETCALCULATE(param1,param2) RETURNS DECIMAL BEGIN DECLARE X1,X2 DECIMAL; SET X1 = GETAMOUNT(param1,param2); IF X1 = 0 THEN SET X1 = GETCALCULATE(param1,100); END IF; SET X2 = (X1 * param2) * 100; RETURN X2; END

[Err] 1415 - Not allowed to return a result set from a function How can i solved this script?

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.