dbTalk Databases Forums  

Is this possible

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Is this possible in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Is this possible - 07-15-2006 , 05:08 PM






create or replace procedure t1 is
strSQL varchar2(50);
my_cursor INTEGER;
begin

strSQL:='create or replace procedure t2 is';
strSQL:= strSQL ||' begin';
strSQL:= strSQL ||' end t2';

my_cursor:= DBMS_SQL.OPEN_CURSOR;

DBMS_SQL.PARSE(my_cursor, strSQL, DBMS_SQL.V7);

DBMS_SQL.CLOSE_CURSOR(my_cursor);




end t1;


Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: Is this possible - 07-15-2006 , 05:24 PM






krishnamurthy.iyer (AT) gmail (DOT) com wrote:
Quote:
create or replace procedure t1 is
strSQL varchar2(50);
my_cursor INTEGER;
begin

strSQL:='create or replace procedure t2 is';
strSQL:= strSQL ||' begin';
strSQL:= strSQL ||' end t2';

my_cursor:= DBMS_SQL.OPEN_CURSOR;

DBMS_SQL.PARSE(my_cursor, strSQL, DBMS_SQL.V7);

DBMS_SQL.CLOSE_CURSOR(my_cursor);




end t1;
Possible yes. Smart? No!

While you are at it take a look at the DBMS_DDL package too if
you Oracle version isn't really 7. BTW: If it isn't 7 what are
you doing with that parameter?
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #3  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Is this possible - 07-16-2006 , 03:38 AM



DA Morgan schreef:
Quote:
krishnamurthy.iyer (AT) gmail (DOT) com wrote:
create or replace procedure t1 is
strSQL varchar2(50);
my_cursor INTEGER;
begin

strSQL:='create or replace procedure t2 is';
strSQL:= strSQL ||' begin';
strSQL:= strSQL ||' end t2';

my_cursor:= DBMS_SQL.OPEN_CURSOR;

DBMS_SQL.PARSE(my_cursor, strSQL, DBMS_SQL.V7);

DBMS_SQL.CLOSE_CURSOR(my_cursor);


end t1;

Possible yes. Smart? No!

While you are at it take a look at the DBMS_DDL package too if
you Oracle version isn't really 7. BTW: If it isn't 7 what are
you doing with that parameter?
Apart from that - it will not work; minimum requirement is to have
a statement between begin and end; - a "NULL;" statement
is sufficient.

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.