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

help: string process in PL/SQL

From: charlie s <word)_at_yahoo.com>
Date: Fri, 18 Oct 2002 10:12:54 GMT
Message-ID: <G8Rr9.30842$nb.16028@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:12:54 CDT

Original text of this message

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