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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

REPLACE with wildcard

534904Nov 18 2008 — edited Nov 19 2008
Hi all,

I am trying to write a SQL to replace a pattern of a string with ''. In the below example my input string is of 5 lines and I want to replace all occurrences of '@'||%||'V$TEMP'. I cant user REGEXP_REPLACE as the client is using 8i
SELECT REPLACE('@1:this is a 1st line'||CHR(10)||
'@1:V$TEMP'||CHR(10)||
'@1:this is 3rd line'||CHR(10)||
'@2:V$TEMP'||CHR(10)||
'@1:this is 5rd line', '@'||'%'||':V$TEMP', '') tt
FROM dual;
Any ideas are greatly appreciated.

Thanks in advance.

Edited by: Reddi on Nov 18, 2008 3:45 PM
This post has been answered by Frank Kulash on Nov 18 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2008
Added on Nov 18 2008
9 comments
6,946 views