> "Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message
> news:F4adnZQNfp-olN3fRVn-qw_at_comcast.com...
>>
>> "CE" <charlie3101_at_hotmail.com> wrote in message
>> news:1111492492.454984.294190_at_o13g2000cwo.googlegroups.com...
>>> 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
>>>
>>
>> why not just use REPLACE()?
>>
>> ++ mcs
>>
>
>
"Mike Cretan" <nospamthanks_at_nowhere.com> wrote in message
news:Ib80e.8571$C7.4109_at_news-server.bigpond.net.au...
> Just as long as you have 9i + RDBMS
>
> Mike
>
ok, why not just use 9i? ;-)
CE -- what's your oracle version?
if pre 9i, then it looks like you could use a combination of dbms_lob.instr,
dbms_lob.substr, and dbms_lob.append. but be careful with dbms_lob.substr --
i believe it has output length limitations.
++ mcs
Received on Wed Mar 23 2005 - 05:02:32 CST