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

Home -> Community -> Usenet -> c.d.o.server -> Re: Why do I get this sqlplus error?

Re: Why do I get this sqlplus error?

From: Steve Blomeley <steveblomeley_at_yahoo.co.uk>
Date: 2000/06/07
Message-ID: <393EC9DC.625EAAA@yahoo.co.uk>#1/1

If you're using Oracle8i Guang, this kind of thing is a bit easier. You can replace all those DBMS_SQL calls with the "EXECUTE IMMEDIATE" statement, so :

...

  cursor_id integer;
 begin
  cursor_id := dbms_sql.open_cursor;
  dbms_sql.parse(cursor_id, 'DROP '||obj_type_in||' '||obj_name_in,  dbms_sql.NATIVE);
  dbms_sql.close_cursor(cursor_id);
 exception
...

becomes :

...

 begin
  execute immediate 'DROP '||obj_type_in||' '||obj_name_in ;  exception
...

Regards
Steve Blomeley Received on Wed Jun 07 2000 - 00:00:00 CDT

Original text of this message

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