Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Using replace in a clob
Hi,
Somebody's come to me with a little problem that I know is solveable, but I'm not sure of the best way.
They've got a load of clobs and within each clob they want to do a series of global text changes, (all to do with them changing the names of substitution variable in some kind of template - it's some kind of php development). So for example, they want to change the string "{date1}" to "{date1:date}".
Now obviously this is trivial in a VARCHAR2 setting, but we're talking about a clob.
So what's the best way? I thought about cutting it up into chunks using DBMS_LOB.SUBSTR, then doing the replace and putting it all back together at the end. There is the problem if my target string happens to span the end of one of the substrings.
Has anybody got any ideas/suggestions?
TIA CE Received on Tue Mar 22 2005 - 05:54:52 CST
![]() |
![]() |