| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> help: string process in PL/SQL
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
![]() |
![]() |