If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Can someone tell me what I'm doing wrong here as it appears pretty simple but it just doesn't work! I have the following stored proc:
CREATE PROCEDURE MYPROC(MYVAR VARCHAR10))
....
BEGIN
SET MYVAR = LCASE(MYVAR); --THIS LINE DOESN'T WORK
DECLARE C1 CURSOR FOR
SELECT * FROM TABLE
OPEN C1;
END @
Can anyone help with this? Am I setting the variable in the wrong place?
[label:]
BEGIN
[NOT ATOMIC | ATOMIC]
[SQL-variable-declaration; | condition-declaration; | return-codes-declaration;]
[statement-declaration;]
[DECLARE-CURSOR-statement;]
[handler-declaration;]
[SQL-procedure-statement;]
END
[label]
There is no “large bullets” between the elements in the syntax diagram.
This means that each elements in the diagram can't change the sequence of them.
You wrote a SET statement(SQL-procedure-statement) before DECLARE-CURSOR-statement.