|
Re: Dynamic Variable Declaration [message #371456 is a reply to message #371403] |
Fri, 20 October 2000 20:51 |
LUNA
Messages: 4 Registered: October 2000
|
Junior Member |
|
|
with dbms_sql.variable_value:
DBMS_SQL.VARIABLE_VALUE(
c IN INTEGER,
name IN VARCHAR2,
value OUT <datatype>);
where <datatype> can be any one of the following types:
NUMBER
DATE
MLSLABEL
VARCHAR2
The following syntax is also supported for the VARIABLE_VALUE procedure:
DBMS_SQL.VARIABLE_VALUE_CHAR(
c IN INTEGER,
name IN VARCHAR2,
value OUT CHAR);
DBMS_SQL.VARIABLE_VALUE_RAW(
c IN INTEGER,
name IN VARCHAR2,
value OUT RAW);
DBMS_SQL.VARIABLE_VALUE_ROWID(
c IN INTEGER,
name IN VARCHAR2,
value OUT ROWID);
where c:Specify the ID number of the cursor from which to get the values.
name:Specify the name of the variable for which you are retrieving the value
value:Returns the value of the variable for the specified position.
Oracle raises exception ORA-06562, inconsistent_type, if the type of this output parameter differs from the actual type of the value, as defined by the call to BIND_VARIABLE.
|
|
|