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

Home -> Community -> Usenet -> c.d.o.tools -> Dynamic SQL

Dynamic SQL

From: ykhlef Mourad <ykhlef_at_yahoo.fr>
Date: 2000/04/11
Message-ID: <38F31E29.434D79B6@yahoo.fr>#1/1

Hi,

Here is my dynamic storage procedure exec.

CREATE OR REPLACE PROCEDURE exec(theString in varchar2) as  cursor_name INTEGER;
 rows_processed INTEGER;
BEGIN
 cursor_name := dbms_sql.open_cursor;

 dbms_sql.parse(cursor_name, theString, dbms_sql.v7);
 rows_processed := dbms_sql.execute(cursor_name);
 dbms_sql.close_cursor(cursor_name);

EXCEPTION
when others then
 dbms_sql.close_cursor(cursor_name);
END exec;
/

Probleme


The command
execute exec('create table myT(a number(34))');

works in SYS schema and does not in a user Schema :

Note that the command
execute exec('drop table client');
works in a user schema

Thank you in advance
Mourad Received on Tue Apr 11 2000 - 00:00:00 CDT

Original text of this message

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