Re: Running a SQL script from a procedure!

From: <daoudamjad_at_emailmiser.com>
Date: Wed, 9 Jan 2008 10:12:31 -0800 (PST)
Message-ID: <f686fc18-c0cc-4304-b53c-19acb9b09058@k39g2000hsf.googlegroups.com>


On Jan 9, 9:08 am, sybra..._at_hccnet.nl wrote:
> On Tue, 8 Jan 2008 20:29:55 -0800 (PST), joe_smile2all
>
> <raghurajn..._at_gmail.com> wrote:
> >Hi!
> >i am right now using oracle 9i.
> >i have a procedure named
>
> >any_table(p_tablename varchar2)
>
> >which i am using to create a .sql file using the UTL_FILE package.that
> >file is again containing the code of another procedure called retrieve
> >.i want to execute the second script so that the procedure retreive
> >gets created....and that too from within the procedure any_table.
>
> >can anyone help me to get this done....
> >thanks.
>
> The idea is just horrible.
> First of all to create procedures on the fly.
> The only place for this is in a generator.
> Secondly, even to want to call sqlplus from inside sqlplus.
> Isn't there execute immediate?
> If you want to program an unscalable application by designing kludges:
> You can do *anything* using execute immediate, you can even create a
> procedure. Just put the entire procedure text in a string. To format
> it include chr(10) calls in the string.
> sqlstr := 'create or replace procedure horrible as  '||chr(10)||
>               'begin '||chr(10)||
>               'null; '||chr(10)||
>              'end;';
>
> and this iwll work.
>
> --
>
> SybrandBakker
> Senior Oracle DBA

pathetic, you

guys!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
check this?!

http://forums.oracle.com/forums/thread.jspa?threadID=582136&tstart=45&start=30

" . . . I am in reality a Swedish girl, called Heidi . . ."

Please Heidi, stop the ruse. . . . Received on Wed Jan 09 2008 - 12:12:31 CST

Original text of this message