add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table OIT (INFTXT) as
select to_clob(q'^<?xml version="1.0"?>
<tdfmt sel-start="218">31 05 2022 Rico Strydom<br/>
Op verzoek (zie e-mail) garanties overplaatsen....<br/>
<br/>
OVERBOEKING CREDITGELDEN:<br/>BANKCODE: 1171<br/>T.L.V.: VERP. NL99BANK999999999999<br/>T.G.V.: RC NL00BANK000000000000<br/>
BEDRAG: EUR 9999999<br/>BESCHRIJVING: Vrijgave verpanding creditgelden AA98987987987 ivm overzetten zekerheid naar BGF<br/>
<br/>
</tdfmt>^')
from dual
union all
select to_clob(q'^<?xml version="1.0"?>
<tdfmt sel-start="219"></tdfmt>^')
from dual
2 rows affected
SELECT XMLSERIALIZE(DOCUMENT XMLQUERY(q'^
copy $i := $doc modify (
for $j in $i/tdfmt/text()[1]
return
insert node ( $text, $br, '&#xa;' ) before $j
)
return $i
^'
PASSING
XMLTYPE(OIT.INFTXT) AS "doc",
LENGTH(EXTRACTVALUE(XMLTYPE(OIT.INFTXT),'tdfmt/text()[1]')) AS "len",
'NEW TEXT TO INSERT' AS "text",
XMLTYPE('<br/>') AS "br"
RETURNING CONTENT) AS CLOB INDENT SIZE=4 )
AS NEW_INFTXT_A
FROM OIT
NEW_INFTXT_A
<?xml version="1.0"?>
<tdfmt sel-start="218">NEW TEXT TO INSERT<br/>
31 05 2022 Rico Strydom<br/>
Op verzoek (zie e-mail) garanties overplaatsen....<br/>
    <br/>
OVERBOEKING CREDITGELDEN:<br/>BANKCODE: 1171<br/>T.L.V.: VERP. NL99BANK999999999999<br/>T.G.V.: RC NL00BANK000000000000<br/>
BEDRAG: EUR 9999999<br/>BESCHRIJVING: Vrijgave verpanding creditgelden AA98987987987 ivm overzetten zekerheid naar BGF<br/>
    <br/>
</tdfmt>
<?xml version="1.0"?>
<tdfmt sel-start="219"/>
SELECT XMLSERIALIZE(DOCUMENT XMLQUERY(q'^
copy $i := $doc modify (
for $j in $i/*
return
insert node ( $text, $br, '&#xa;' ) into $j
)
return $i
^'
PASSING
XMLTYPE(OIT.INFTXT) AS "doc",
LENGTH(EXTRACTVALUE(XMLTYPE(OIT.INFTXT),'tdfmt/text()[1]')) AS "len",
'NEW TEXT TO INSERT' AS "text",
XMLTYPE('<br/>') AS "br"
RETURNING CONTENT) AS CLOB INDENT SIZE=4 )
AS NEW_INFTXT_B
FROM OIT
NEW_INFTXT_B
<?xml version="1.0"?>
<tdfmt sel-start="218">31 05 2022 Rico Strydom<br/>
Op verzoek (zie e-mail) garanties overplaatsen....<br/>
    <br/>
OVERBOEKING CREDITGELDEN:<br/>BANKCODE: 1171<br/>T.L.V.: VERP. NL99BANK999999999999<br/>T.G.V.: RC NL00BANK000000000000<br/>
BEDRAG: EUR 9999999<br/>BESCHRIJVING: Vrijgave verpanding creditgelden AA98987987987 ivm overzetten zekerheid naar BGF<br/>
    <br/>NEW TEXT TO INSERT<br/>
</tdfmt>
<?xml version="1.0"?>
<tdfmt sel-start="219">NEW TEXT TO INSERT<br/>
</tdfmt>
SELECT XMLSERIALIZE(DOCUMENT XMLQUERY(q'^
if ($len>0)
then
copy $i := $doc modify (
for $j in $i/tdfmt/text()[1]
return
insert node ( $text, $br, '&#xa;' ) before $j
)
return $i
else
copy $i := $doc modify (
for $j in $i/*
return
insert node ( $text, $br, '&#xa;' ) into $j
)
return $i
^'
PASSING
XMLTYPE(OIT.INFTXT) AS "doc",
LENGTH(EXTRACTVALUE(XMLTYPE(OIT.INFTXT),'tdfmt/text()[1]')) AS "len",
'NEW TEXT TO INSERT' AS "text",
XMLTYPE('<br/>') AS "br"
RETURNING CONTENT) AS CLOB INDENT SIZE=4 )
AS NEW_INFTXT1
FROM OIT
NEW_INFTXT1
<tdfmt sel-start="218">NEW TEXT TO INSERT<br/>
31 05 2022 Rico Strydom<br/>
Op verzoek (zie e-mail) garanties overplaatsen....<br/>
    <br/>
OVERBOEKING CREDITGELDEN:<br/>BANKCODE: 1171<br/>T.L.V.: VERP. NL99BANK999999999999<br/>T.G.V.: RC NL00BANK000000000000<br/>
BEDRAG: EUR 9999999<br/>BESCHRIJVING: Vrijgave verpanding creditgelden AA98987987987 ivm overzetten zekerheid naar BGF<br/>
    <br/>
</tdfmt>
<tdfmt sel-start="219">NEW TEXT TO INSERT<br/>
</tdfmt>
SELECT XMLSERIALIZE(DOCUMENT XMLQUERY(q'^
copy $i := $doc modify (
if ($len>0)
then
for $j in $i/tdfmt/text()[1]
return
insert node ( $text, $br, '&#xa;' ) before $j
else
for $j in $i/*
return
insert node ( $text, $br, '&#xa;' ) into $j
)
return $i
^'
PASSING
XMLTYPE(OIT.INFTXT) AS "doc",
LENGTH(EXTRACTVALUE(XMLTYPE(OIT.INFTXT),'tdfmt/text()[1]')) AS "len",
'NEW TEXT TO INSERT' AS "text",
XMLTYPE('<br/>') AS "br"
RETURNING CONTENT) AS CLOB INDENT SIZE=4 )
AS NEW_INFTXT1
FROM OIT
NEW_INFTXT1
<?xml version="1.0"?>
<tdfmt sel-start="218">NEW TEXT TO INSERT<br/>
31 05 2022 Rico Strydom<br/>
Op verzoek (zie e-mail) garanties overplaatsen....<br/>
    <br/>
OVERBOEKING CREDITGELDEN:<br/>BANKCODE: 1171<br/>T.L.V.: VERP. NL99BANK999999999999<br/>T.G.V.: RC NL00BANK000000000000<br/>
BEDRAG: EUR 9999999<br/>BESCHRIJVING: Vrijgave verpanding creditgelden AA98987987987 ivm overzetten zekerheid naar BGF<br/>
    <br/>
</tdfmt>
<?xml version="1.0"?>
<tdfmt sel-start="219">NEW TEXT TO INSERT<br/>
</tdfmt>
SELECT XMLSERIALIZE(DOCUMENT XMLQUERY(q'^
copy $i := $doc modify (
for $j in $i/tdfmt/text()[1]
return
if ($len>0)
then
insert node ( $text, $br, '&#xa;' ) before $j
else
insert node ( $text, $br, '&#xa;' ) into $j
)
return $i
^'
PASSING
XMLTYPE(OIT.INFTXT) AS "doc",
LENGTH(EXTRACTVALUE(XMLTYPE(OIT.INFTXT),'tdfmt/text()[1]')) AS "len",
'NEW TEXT TO INSERT' AS "text",
XMLTYPE('<br/>') AS "br"
RETURNING CONTENT) AS CLOB INDENT SIZE=4 )
AS NEW_INFTXT1
FROM OIT
NEW_INFTXT1
<?xml version="1.0"?>
<tdfmt sel-start="218">NEW TEXT TO INSERT<br/>
31 05 2022 Rico Strydom<br/>
Op verzoek (zie e-mail) garanties overplaatsen....<br/>
    <br/>
OVERBOEKING CREDITGELDEN:<br/>BANKCODE: 1171<br/>T.L.V.: VERP. NL99BANK999999999999<br/>T.G.V.: RC NL00BANK000000000000<br/>
BEDRAG: EUR 9999999<br/>BESCHRIJVING: Vrijgave verpanding creditgelden AA98987987987 ivm overzetten zekerheid naar BGF<br/>
    <br/>
</tdfmt>
<?xml version="1.0"?>
<tdfmt sel-start="219"/>