SQL>
SQL>
SQL> CREATE OR REPLACE PROCEDURE AssignDate (expr_in IN DATE, var_inout IN OUT DATE)
2 IS
3 cur PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
4 returnValue PLS_INTEGER;
5 BEGIN
6 DBMS_SQL.PARSE (cur, 'BEGIN :var := :dtval; END;', DBMS_SQL.NATIVE);
7 DBMS_SQL.BIND_VARIABLE (cur, 'var', SYSDATE);
8 DBMS_SQL.BIND_VARIABLE (cur, 'dtval', expr_in);
9 returnValue := DBMS_SQL.EXECUTE (cur);
10 DBMS_SQL.VARIABLE_VALUE (cur, 'var', var_inout);
11 END;
12 /
Procedure created.
SQL>
|