Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: bind within functions

Re: bind within functions

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 24 May 2005 09:07:20 -0700
Message-ID: <1116950574.977684@yasure>


Chris ( Val ) wrote:
> <felixpfrunder_at_gmx.net> wrote in message
> news:1116920798.018251.38600_at_g49g2000cwa.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

Correct. There is no value in doing what was done above except in NDS.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue May 24 2005 - 11:07:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US