![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I would like to set a bind variable within a function I tried the following: VARIABLE x NUMBER CREATE OR REPLACE FUNCTION setX RETURN NUMBER IS BEGIN :x := 2; RETURN 0; END; / but I received the syntax error 4/3 PLS-00049: bad bind variable 'X' How have I to declar x |
#4
| |||
| |||
|
|
felixpfrunder (AT) gmx (DOT) net> wrote in message news:1116920798.018251.38600 (AT) g49g2000cwa (DOT) googlegroups.com... |I would like to set a bind variable within a function | | I tried the following: | | VARIABLE x NUMBER | | CREATE OR REPLACE FUNCTION setX | RETURN NUMBER IS | BEGIN | :x := 2; | RETURN 0; | END; | / | | but I received the syntax error | | 4/3 PLS-00049: bad bind variable 'X' | | How have I to declar x I'm just an occasional dabbler in PL/SQL (and someone will no doubt correct me if I'm wrong), but AFAIK, all PL/SQL variables are naturally bind variables, so there is no need for explicit qualification, unless using dynamic SQL, IIRC. Cheers, Chris Val |
![]() |
| Thread Tools | |
| Display Modes | |
| |