SamsonChung
asked on
MySQL Stored Procedure Calling MySQL Stored Procedure
I have two MySQL Stored Procedure,
CREATE Procedure proc1(
IN alpha VARCHAR(10)
, OUT Beta VARCHAR(55)
) --blah blah blah code for proc
CREATE Procedure proc2()
BEGIN
DECLARE l_alpha VARCHAR(10);
DECLARE l_beta VARCHAR(55);
CALL proc1(l_alpha, l_beta);
END
Why am I getting
ERROR 1414 (42000): OUT or INOUT argument 2 for routine schema.proc1 is not a variable or NEW pseudo-variable in BEFORE trigger
??
Is there any other method around this? best practice?
CREATE Procedure proc1(
IN alpha VARCHAR(10)
, OUT Beta VARCHAR(55)
) --blah blah blah code for proc
CREATE Procedure proc2()
BEGIN
DECLARE l_alpha VARCHAR(10);
DECLARE l_beta VARCHAR(55);
CALL proc1(l_alpha, l_beta);
END
Why am I getting
ERROR 1414 (42000): OUT or INOUT argument 2 for routine schema.proc1 is not a variable or NEW pseudo-variable in BEFORE trigger
??
Is there any other method around this? best practice?
ASKER
No triggers what so ever...
What i was trying at the time when I got that message was to have one stored Proc call another stored Proc.
so, proc 2 calls proc 1. proc 1 does it thing, then return the result using INOUT variables of MySQL and return that to proc 2.
I was trying to get proc 2 to read this returned variable and use it. Then this problem showed up when I tried to create th proc.
What i was trying at the time when I got that message was to have one stored Proc call another stored Proc.
so, proc 2 calls proc 1. proc 1 does it thing, then return the result using INOUT variables of MySQL and return that to proc 2.
I was trying to get proc 2 to read this returned variable and use it. Then this problem showed up when I tried to create th proc.
ASKER
I've found out what I did wrong,
It was a silly mistake.
It was a silly mistake.
can you post here, then the question can be PAQed with points refunded.
angelIII, zone advisor
angelIII, zone advisor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
can you clarify about that?