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: replace text in a file, with PL/SQL

Re: replace text in a file, with PL/SQL

From: Anurag <avdbi_at_hotmail.com>
Date: Tue, 25 Jun 2002 20:53:16 -0400
Message-ID: <uhi441fif5dm37@corp.supernews.com>


Hi,
In case you have not been reading this newsgroup regularly .. there is a recent thread in which someone asks about executing a sql script from pl/sql.
The advice by wise people (Sybrand? :) was to convert the sql script into pl/sql instead. If I were you, I would take that advice. In the same thread, it was advised that if you really really want to do this then one way is to write an external procedure which will call your sql script. There might be many other options which you might have .. I don't know the exact nature of your problem .. thus cannot comment on it.

In case you are planning to go on the "really really" route, you might want to consider that sql scripts can be passed arguments on the command prompt which are then interpreted into the &1 &2 ... variables. You would hence replace that variable name by &1 instead (or use define to set it .. instead of trying some painful way to replace that string using pl/sql).

Anurag

"Epicentre Team B Annecy" <carmanet_at_epicentre.fr> wrote in message news:af94vg$s7a$1_at_wanadoo.fr...
> First, thanks to both of you for your answers!
>
> Then, to Daniel:
> I have a (big!) sql script, with a &&var, and I would like to automate its
> execution in a stored procedure,
> without having to give the value (in sql*plus, for example); so, I have to
> replace the &&var string in the script
> by a value given by the procedure. Finally, I launch the script from the
> procedure (I don't know yet how to do this!!).
>
> To Rauf:
> Unfortunately, the script is bigger than 32000!
>
> Thanks again!
>
> Celine.
>
> "Epicentre Team B Annecy" <carmanet_at_epicentre.fr> a écrit dans le message
> news: af6p5j$7u$1_at_wanadoo.fr...
> > Hello,
> >
> > I've an opened file in a PL/SQL procedure (with UTL_FILE), and I would
> like
> > to know if it's possible
> > to replace a string in this file by another string, in my procedure?
> >
> > Thanks!
> >
> > Céline.
> >
> >
>
>
Received on Tue Jun 25 2002 - 19:53:16 CDT

Original text of this message

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