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 -> Bind Variable in Procedure

Bind Variable in Procedure

From: <lee>
Date: Sun, 10 Jul 2005 12:53:06 +0800
Message-ID: <42d0a9af$1_2@rain.i-cable.com>


Hi,

A simple silly question from a beginner - I cannot find related info explicitly explained in the textbook.

Is iSQL*PLUS bind variable limited to anonymous block? My personal interpretation is that named block could be called by any host environments, and we cannot guarantee the availability of host variables in these environments, so it is not allowed in named block.

This anonymous block is ok:
/* in sqlplus issues: variable var1 number * /
DECLARE
BEGIN
    dbms_output.put_line('value is '|| :var1); END; If I turn it into a function:

CREATE OR REPLACE FUNCTION somefunc RETURN number BEGIN
    dbms_output.put_line('value is '|| :var1);     return 1;
END; It produces error complaining :var is invalid.

Thx for answering such a simple question. Received on Sat Jul 09 2005 - 23:53:06 CDT

Original text of this message

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