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: string process in PL/SQL

Re: string process in PL/SQL

From: Roman Mirzaitov <rmirzaitov_at_kt.kg>
Date: Fri, 18 Oct 2002 16:45:49 +0600
Message-ID: <aooops$omrh4$1@ID-127142.news.dfncis.de>


Hi,
look at INSTR and SUBSTR SQL functions.
Details in Oracle SQL Reference.

Regards,

--
Roman Mirzaitov
Brainbench MVP for Oracle Administration
www.brainbench.com

"charlie s" <cs3526(delete this word)@yahoo.com> wrote in message
news:G8Rr9.30842$nb.16028_at_nwrddc02.gnilink.net...

> In one of our PL/SQL code, it looks like this
>
> CURSOR sql_pieces_cur
> IS
> SELECT sql_text
> FROM v\$sqltext
> WHERE address = addr_IN
> AND hash_value = hash_IN
> ORDER BY piece ASC;
> FOR sql_pieces_rec IN sql_pieces_cur
> LOOP
> .................
>
> Most of the time, sql_pieces_rec contains sql statement like
> "select col1 from A"
> But sometimes, it contains comments in it and it will cause error in our
> application.
> "select --this statement is for training purpost-- col1 from A"
> How could I process sql_pieces_rec to remove all the comments starting
from
> "--" ending "--"
> so my sql_pieces_rec will always look like
> "select col1 from A"
>
> Thanks you very much for your help.
>
>
>
>
Received on Fri Oct 18 2002 - 05:45:49 CDT

Original text of this message

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