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!

Update XML data stored in CLOB Column

user13006877Apr 19 2010 — edited Jul 26 2012
Hi All,

i am new to Oracle and new to SQL
i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
<attrs><attr name="name"><string>Schade</string></attr></attrs>

i am using the following query for updating the value

UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'

this query is working fine but it changing the data to the following format

<attrs><attr name="name">Schade</attr></attrs>
some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.

any help in this regard will b e much appriciated

Thanks in Advance
-Umesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2012
Added on Apr 19 2010
10 comments
16,114 views