Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using TRANSLATE instead of REGEXP_REPLACE

504552Mar 15 2010 — edited Mar 16 2010
Hello, can anyone please tell me how to use TRANSLATE to replace the following:

This is part of a stored procedure in which I will be passing the column list and delimitor as parameters.


regexp_replace(upper(p_query), '^SELECT (.*?) FROM', 'SELECT ' || l_column_string || ' FROM');

Here is what the output should look like:
SELECT COL_1||'|'||COL_2 FROM TABLE_1

I need to to support 9i. This code was written for a 10g/11g environment. Thank you.

David

Edited by: JesusLuvR on Mar 15, 2010 4:41 PM

Edited by: JesusLuvR on Mar 15, 2010 4:47 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2010
Added on Mar 15 2010
3 comments
835 views