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!

replace multiple text occurances

913578Jun 19 2019 — edited Nov 10 2019

Hi,

I have a sample text like below.

Process definitions are similar to Report definitions and they're created Password:mypassword123

changed to Password:mypassword1234 and managed in Logi Studio in the same way. They contain element groups called Tasks, which are created in Logi Studio using elements in a manner similar to creating a Report definition. Unlike Report definitions, tasks run at the web server and don't present anything visual in the browser.

in the above text i want to replace 15 characters after string Password: with XXXX

here Password:mypassword123 and Password:mypassword1234 should be replaced with

Password:XXXX

with the below query i am able to replace only one occurance, the second one is not replacing.

Update help_desk set notes=

replace(notes,substr(notes,instr(lower(notes),'password:')+9,15),'XXXX')

where incident_number='INC000018426375';

Thanks.

This post has been answered by mathguy on Jul 2 2019
Jump to Answer
Comments
Post Details
Added on Jun 19 2019
14 comments
1,052 views