Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: String search and replace in pl/sql
Unless the SQL always has a single level of nesting as in your example
you will probably need to build an elaborate process to parse the SQL
statement, even down to looking at paired parentheses.
About the only thing you can be sure of is that each Select will have a
>From clause. Unfortunately the Where and Order By clauses are
optional.
...or maybe just take the entire SQL statement, and wrap it inside this:
Select * from ( [the entire original sql select] ) order by [new order-by clause] Received on Fri Feb 10 2006 - 11:53:15 CST