Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> dbms_sql problem
This is actually straight out of Oracle 8 documentation for
Dynamic SQL, but I am unable to load it. I have all resource
and connect permissions and there does not seem to be any
syntax errors. What am I missing ?
Thanks,
Malini
The error I get is
Line/Col Error 7/5 P/L SQL : Statement ignored 7/67 PLS-00226: package 'DBMS_SQL' used as variable reference ----------------------------------------------------------------------
Procedure text with line numbers
1 CREATE OR REPLACE PROCEDURE demo(salary IN NUMBER) AS
2 cursor_name INTEGER;
3 rows_processed INTEGER;
4 BEGIN
5
6 cursor_name := dbms_sql.open_cursor;
7 dbms_sql.parse(cursor_name, 'DELETE FROM emp WHERE sal > :x', dbms_sql); 8 dbms_sql.bind_variable(cursor_name, ':x', salary); 9 rows_processed := dbms_sql.execute(cursor_name); 10 dbms_sql.close_cursor(cursor_name);11
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed May 27 1998 - 18:30:04 CDT