MySQL Forums
Forum List  »  Stored Procedures

Re: OUT Params and error 1414
Posted by: Roland Bouman
Date: November 17, 2005 05:11PM

In your call, you are passing literals - not variables.
Thats fine for the IN parameters, however, the out parameter is having a problem: how can MySQL assign the 2 as in

SET spTrigger = 2;

to the literal value

1

that you passed in

call fill_roughing(3,2,1)

? It can't, because 1 is just 1; it will never become 2.

This however should work:

set @spTrigger := 1;
call fill_roughing(3,2,@spTrigger);

Now, we pass the _variable_ @spTrigger. When you'd now do:

select @spTrigger;

you can witness that the value of @spTrigger has indeed changed due to the call.

NOTE: I used @spTrigger as an identifier; this has nothing to do with your parameter definition being called spTrigger. We are dealing with two distinct variables here.
@spTrigger could just as well have been called @coleSlaw, and it would still work.

Options: ReplyQuote


Subject
Views
Written By
Posted
12610
November 17, 2005 02:21PM
Re: OUT Params and error 1414
5534
November 17, 2005 05:11PM
3566
November 18, 2005 01:40PM
3552
November 18, 2005 03:35PM


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.