What is AFAIK....
I did get all the procedure to compile, all but the CALL statments. The
dynamic SQL is in a variable... now I need to run the variable.
Any suggestions for running the variable?
----- Original Message -----
From: "Marek" <wmarek98@stripped>
To: "Melissa Dougherty" <melissa@stripped>
Sent: Friday, November 04, 2005 5:15 PM
Subject: Odp: 5.0.15 Stored Procedures
> First I repeat that AFAIK
> 1.variables declared INSIDE stored procedures don't have this "@"
> 2.before you may call any procedure it must be in the table with stored
> procedures ie in "mysql.proc"
> 3. calling procedure you have to give parameters so for example -> call
> 4.I'm not very sure if it is possible to create dynamic procedure being
> inside another procedure but after creating a body of such procedure you
> have to insert it into this table (mysql.proc) and , after finishing - to
> delete from this table. It comes a question if such a "dynamic" procedure
> will be available for its "creator procedure". Try to write and create a
> simple procedure to know what must be a structure of this INSERT
> 5. As FirstRec,Page,RecsPerPage are variables and in mentioned
> there is not any query ; so your format is correct. Only if in statement
> use a information from query you have to use select (with "into") .
> select max(year1) into CurrYear from TempItems
> ----- Original Message -----
> From: Melissa Dougherty <melissa@stripped>
> To: <win32@stripped>; Marek <wmarek98@stripped>
> Sent: Friday, November 04, 2005 7:12 PM
> Subject: Re: 5.0.15 Stored Procedures
>> Would I do the same thing with the following statement.... I still
>> an error.
>> SET FirstRec = (Page - 1) * RecsPerPage -- i.e. SELECT (Page - 1) *
>> RecsPerPage INTO FirstRec ;
>> Also, how do I exec the variable that holds the string? If I do the CALL
>> SQL1; it says incorrect syntax.
>> ----- Original Message -----
>> From: "Marek" <wmarek98@stripped>
>> To: <melissa@stripped>
>> Sent: Friday, November 04, 2005 10:24 AM
>> Subject: Re: 5.0.15 Stored Procedures
>> > In your stored procedure there is third problem:
>> > AFIK
>> > SET RecordCount = count(*) from TempItems
>> > will not work, replace it with
>> > select count(*) into RecordCount from TempItems
>> > Marek