Updating xml type column

Hi,
I have a xml type column with content as follows
<?xml version="1.0" encoding="utf-8"?>
<PartInformation PartNumber="4393">
<Maintenance />
<Details>
<Specs PartNumber="4393">
<Type Code="K"></Type>
</Specs>
</Details>
</PartInformation>
<PartInformation PartNumber="4395">
<Maintenance />
<Details>
<Specs PartNumber="4395">
<Type Code="Z"></Type>
</Specs>
</Details>
</PartInformation>
I want to update the PartNumber="4393" to PartNumber="5789" for every occurrence .
What is the easiest way to do it?
Thanks

Hi,
Something like this?
UPDATE your_table
SET xmlcol = updatexml(xmlcol,'//*[@PartNumber="4393"]/@PartNumber','5789')
WHERE ...

Similar Messages

  • (updating xml value)adding an element in an xml type column

    Hi all,
    i hava a table that contains an xml-Type column (non schema based)
    i have inserted some data in it
    table:(id,xmlcolumn)
    ex:
    insert into t1 values(1,'<Chapters>
    <Chapter>ch1<Chapter>
    <Chapter>ch2<Chapter>
    </Chapters>')
    i need to add a new Chapter: <Chapter>ch3</Chapter>
    for the result of xml instance in the table to be:
    <Chapters>
    <Chapter>ch1<Chapter>
    <Chapter>ch2<Chapter>
    <Chapter>ch3<Chapter>
    </Chapters>
    plz if any one colud help

    SQL> DECLARE
      2      l_xml      XMLTYPE := XMLTYPE('<Chapters>
      3  <Chapter>ch1</Chapter>
      4  <Chapter>ch2</Chapter>
      5  </Chapters>');
      6      l_xsl      XMLTYPE;
      7      l_new_node VARCHAR2(100) := '<Chapter>ch3</Chapter>';
      8  BEGIN
      9      dbms_output.put_line('Before adding node:');
    10      dbms_output.put_line('----------------------------------------------------------------');
    11      dbms_output.put_line(l_xml.getStringVal());
    12      dbms_output.put_line('----------------------------------------------------------------');
    13      l_xsl := XMLTYPE('<?xml version="1.0"?>' ||
    14                       '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"' ||
    15                       ' version="1.0"' || ' result-ns=""' || ' indent="no">' ||
    16                       '<xsl:output method="xml" media-type="text/xml" indent="no"/>' ||
    17                       '<xsl:template match="/">' ||
    18                           '<' ||l_xml.getRootElement() || '>' ||
    19                               ' <xsl:for-each select="/' || l_xml.getRootElement() ||'/Chapter">' ||
    20                                   '<xsl:copy-of select="." />' ||
    21                               '</xsl:for-each>' ||
    22                               l_new_node ||
    23                           '</' || l_xml.getRootElement() || '>' ||
    24                       '</xsl:template>' ||
    25                       '</xsl:stylesheet>');
    26      l_xml := l_xml.Transform(l_xsl);
    27      dbms_output.put_line('After adding node:');
    28      dbms_output.put_line('----------------------------------------------------------------');
    29      dbms_output.put_line(l_xml.getStringVal());
    30      dbms_output.put_line('----------------------------------------------------------------');
    31  END;
    32  /
    Before adding node:
    <Chapters>
    <Chapter>ch1</Chapter>
    <Chapter>ch2</Chapter>
    </Chapters>
    After adding node:
    <Chapters>
      <Chapter>ch1</Chapter>
      <Chapter>ch2</Chapter>
      <Chapter>ch3</Chapter>
    </Chapters>
    PL/SQL procedure successfully completed.
    SQL>

  • Inserting a row in a schema-based xml type column

    i have problems while inserting a row in a schema-based xml type column
    it reports an error(schema and elemnt do not match)
    although they are matching if anyone can try it
    and if it worked plz send me the example

    SQL> DESC XML_TAB;
    Name Null? Type
    XML XMLTYPE
    SQL> INSERT INTO XML_TAB
    2 VALUES
    3 (xmltype('<request>
    4 <filter>(extshortname=bhagat)</filter>
    5 <attributes>dn</attributes>
    6 <context/>
    7 <scope>subtree</scope>
    8 </request>'));
    1 row created.
    If your problem persists,post ur lines of code..
    Good luck!!!
    Bhagat

  • Xml type column

    Hi,
    This is my first time ever working with xml type column. I have a xml type column with name,value pairs. This xml type column needs to be indexed. How can I index this column(which index is suitable)? Also can xml type column be used in where clause for the joins with another table columns.
    Thank You
    SK

    XMLTypes in 10.1 are extremely slow and extremely buggy.
    They're maginally better in 10.2 (with the exception of anything added in that release, most notably XQuery), although there are some disasterous bugs in 10.2 in functionality that was actually fine in 10.1 (e.g. memory leaks, scaling nightmares).
    The XML Respository (required for XSD registration and shredding) is very unstable and will cause performance issues and instance outages.
    This is on top of the intrinsic performance and volume inefficiencies involved with XML.
    If you store data in a (column,row) of a SQL table it needs to be atomic with respect to the context of the database. Hiding information inside XML in a column of a table means your data is no longer even in 1st normal form. Surely we can all agree that is a Bad Idea and contrary to any concept of good practise, at this late stage.
    Furthermore querying XML structures is complex, slow and inflexible due to the asymetric nature of hierarchies. And once your information is in it, you're stuck with the incompleteness of XPath and the inefficiency of XQuery. All the indices in the world won't save you.
    More still, it is almost impossible, and very expensive to constrain the data in the XML other than trivial domain and "data type" constraints. The constraints require procedural validation and are not immediate. So you can kiss goodbye to referential integrity and consistency even if you figure out how to implement them.
    Also "abstract clob" XMLType storage requires multiple full document copies for read consistency purposes, so you will cripple your instance and your storage overhead (typically rather kindly benchmarked at 3 times SQL volume) will exponentially run away.
    Just don't do it.

  • Generating table with XML Type column while registering schema

    Hi,
    Is it possible to generate a table with an XML Type column during schema registering. Does the "xdb:defaultTable" always create an XMLType table?
    Thanks.
    Rahul

    "You can create XML schema-based XMLType tables and columns and optionally specify, for example, that they:Conform to pre-registered XML schema ."
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96620/xdb01int.htm

  • XMLTYPE as CLOB storage "inserting large xml document in xml type column"

    Hi All,
    i have a table containing an xml datatype(non schema based)
    i would like to insert a large xml document in it
    but an exception is thrown-->"string literal too long"
    i tried to use bind variables as a solution"prepared statements as i write in java"
    but it didn't work....as xml document is large
    when i tried to change the column type to CLOB,it worked but without xml validataion,
    although the xml type is mapped to a CLOB in storage, xml type couldn't insert the document
    if anyone have a solution plz tell,i needed it urgently
    thanks,in advance :-)

    thx it was very useful :-)
    but i am not having any success getting the following statement working using a JDBC connection pool rather than a hard coded URL connection
    tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    it works with:
    "jdbc:oracle:thin:@server:port:dbname"
    Does NOT work with:
    datasource.getConnection()
    if anyone colud help...

  • Updating Object Type Columns with SQL

    Please note that is a re-post from a different forum. I thought I would try this forum as reading through it, it made more sense to post here. Problem:
    I am trying to update a column inside a Nested Table Type in my Table.
    This is what I got from some documentation I found from Oracle.
    UPDATE TABLE(SELECT PROGRAMS FROM TB_ITEM_MASTER WHERE ITEM_NO_ID =1748) IM
    SET IM.PROGRAM_ID = 1;
    WHERE IM.ITEM_NO_ID = 1748;
    Where PROGRAM_ID is a field from the nested table (ITEMS_IN_PROGRAMS_NT) and ITEM_NO_ID is the Primary Key in my TB_ITEM_MASTER table. When I run this it gives me an error of:
    ORA-22908: REFERENCE TO NULL TABLE VALUE
    I assume this is because PROGRAM_ID is currently NULL, and when it pulls the record back, I am pulling a NULL value. Currently all the values will be NULL in the table, but I would like to create a UPDATE Statement that I will call that will update that value, from NULL to whatever ID.
    Here are my def'n's of all my objects for this problem:
    --Object Type def'n
    CREATE OR REPLACE TYPE ITEMS_IN_PROGRAMS_TY AS OBJECT(
    PROGRAM_ID NUMBER(38));
    --Object Type def'n for Nested Table
    CREATE OR REPLACE TYPE ITEMS_IN_PROGRAMS_NT
    AS TABLE OF ITEMS_IN_PROGRAMS_TY;
    --Table def'n
    CREATE TABLE TB_ITEM_MASTER
    (ITEM_NO_ID NUMBER(38) NOT NULL,
    ITEM_NO VARCHAR2(75) NOT NULL,
    NOMENCLATURE VARCHAR2(100) NULL,
    PROGRAMS DMISDBA.ITEMS_IN_PROGRAMS_NT NULL);
    Can someone please help me....I am pulling my hair out on this problem!!! All I want to do is update the column inside a Nested Table. This can not be that hard!!!

    Save your hair...
    SQL> CREATE OR REPLACE TYPE items_in_programs_ty AS OBJECT(
      2  program_id NUMBER(38));
      3  /
    Type created.
    SQL> CREATE OR REPLACE TYPE items_in_programs_nt
      2  AS TABLE OF items_in_programs_ty;
      3  /
    Type created.
    SQL> CREATE TABLE tb_item_master
      2  (item_no_id number(38) not null,
      3  item_no varchar2(75) not null,
      4  nomenclature varchar2(100) null,
      5  programs items_in_programs_nt )
      6  NESTED TABLE programs STORE AS nested_programs
      7  /
    Table created.
    SQL>
    SQL> INSERT INTO tb_item_master (item_no_id, item_no, nomenclature)
      2  VALUES (1748, 'APC/1748', 'Gizmo')
      3  /
    1 row created.
    SQL> UPDATE tb_item_master tmi
      2  SET    tmi.programs =  items_in_programs_nt(items_in_programs_ty( 1))
      3  WHERE  tmi.item_no = 'APC/1748'
      4  /
    1 row updated.
    SQL>
    SQL> Cheers, APC

  • Correct way to handle updates of XMLtype columns in standard tables.

    Hello to whoever may read this,
    I am currently studying the XML functionality of oracle DB for a uni project.
    We have been asked to compare/contrast solutions to publishing product and price data for data stored in standard relational tables, and data stored in XML type tables. For extra marks, i am looking at a table containing an XMLType column for multiple items of data relating to the primarykey.
    I have managed to get my head around publishing the data - pretty straight forward, but we have also been asked to show how we can update data, which isn't a problem within the standard tables/columns, but when it comes to the XMLType columns/tables, i dont have a clue.
    At the moment i am working on trying to update an XMLtype column. The table itself is a "product" table, and contains product information, as well as an XMLType column containing multiple changes to the prices. In the relational tables, this "product" table has a one-to-many link to another table called price_history which contains details about past prices (which is populated by a trigger on update/insert of a new price). But in this table all the product changes are stored in XML format in the XML type column "prices".
    Table columns: id number(4), name varchar2(25), prices xmltype;
    example data: 1781, CDW 20/48/E, <product_prices><price_change>
    <change_id>1</change_id>
    <date_changed>2009-10-13</date_changed>
    <details>price increased</details>
    <new_value>234</new_value>
    </price_change>
    <price_change>
    <change_id>2</change_id>
    <date_changed>2009-10-13</date_changed>
    <details>price increased</details>
    <new_value>235</new_value>
    </price_change></product_prices>
    We need to give examples of an update. I have been looking around the net, and these forums for a solution now for about 4 hours. My own thoughts are that to update this with a new price change i need to, SELECT the current data INTO a variable, then concatenate that variable with the new price change info e.g.
    <price_change>
    <change_id>3</change_id>
    <date_changed>2009-10-13</date_changed>
    <details>price decreased</details>
    <new_value>230</new_value>
    </price_change>
    then insert that whole chunk of data again to overwrite the old data.
    Now im fairly certain there is some function somewhere which will allow me to do this update/insert operation without going through this process... After i am done with this update of XMLType column data, i need to tackle updating data in an XMLType Table with XQuery(? apparently), so if you have any pointers for that please let me know.
    Could one of you experts point me in the right direction for this? Any advice at this stage is a great help and will stop me losing my mind.
    p.s. im sorry about the lengthy description of the problem/solution required. How to describle something i dont understand? I ask myself.

    Hi,
    You really need to take a look at the XMLDB Developers guide.
    For updating XML with SQL/XML see UPDATEXML and for XQuery see [Using XQuery with Oracle XMLDB|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb_xquery.htm#sthref1673]
    HTH,
    Chris

  • Parsing the data from and xml type field

    Hi - I have registered a schema and inserted arecord into the table with the xml type column. Now I want to parse the data from the xmltype field into a relational table. I have been using the following select statement to accomplish this - and it does work if there is data in all the selected fields but when the filed is null then the whole select statement fails and brings back 'no rows returned'.If the value is null I want the select statment to return null. please give any ideas.
    SELECT version,frmd_transaction_date,extractValue(value(b), 'event_update/location')"location",
    extractValue(value(b), 'event_update/sending_system')"sending_system",
    extractValue(value(b), 'event_update/event_identifier')"event_identifier",
    extractValue(value(b), 'event_update/event_link')"event_link",
    extractValue(value(b), 'event_update/organization_code')"organization_code",
    nvl(extractValue(value(c), '/schedule/event_duration_minutes'),'000')"event_minutes"
    FROM fraamed_user.frmd_event_update , TABLE(xmlsequence(extract(xml_event_update, '/event_update')))b,
    TABLE(xmlsequence(extract(xml_event_update, '/event_update/schedule')))c

    ...then I guess you have to rewrite the query.
    Is schedule another xml sequence inside of event_update sequence ?
    If it is not you can try this :
    SELECT version,frmd_transaction_date,extractValue(value(b), '/event_update/location/text()')"location",
    extractValue(value(b), '/event_update/sending_system/text()')"sending_system",
    extractValue(value(b), '/event_update/event_identifier/text()')"event_identifier",
    extractValue(value(b), '/event_update/event_link/text()')"event_link",
    extractValue(value(b), '/event_update/organization_code/text()')"organization_code",
    extractValue(value(b), '/event_update/schedule/event_duration_minutes/text()')"event_minutes"
    FROM fraamed_user.frmd_event_update , TABLE(xmlsequence(extract(xml_event_update, '/event_update')))b
    ...if yes, did you try nvl function (I don't think this would be a solution of a problem):
    SELECT version,frmd_transaction_date,nvl(extractValue(value(b), '/event_update/location/text()')"location", 'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/sending_system/text()')"sending_system",'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/event_identifier/text()')"event_identifier",'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/event_link/text()')"event_link",'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/organization_code/text()')"organization_code",'NULL VALUE'),
    nvl(extractValue(value(c), '/schedule/event_duration_minutes/text()')"event_minutes",'NULL VALUE')
    FROM fraamed_user.frmd_event_update , TABLE(xmlsequence(extract(xml_event_update, '/event_update')))b,
    TABLE(xmlsequence(extract(xml_event_update, '/event_update/schedule')))c
    If none of this works post your xml schema.

  • XML-Type and reference to unavailable DTD causes validation problems

    Hi,
    I'm fairly new to Oracle's XML features. I've created a view that produces XML from a number of tables. The resulting XML is used to be stored on a web site for download by customers (this is a manual process about once a week via a CMS). It contains a reference to a DTD that is available on the web server, too. This XML must also be stored in the Oracle database. The problem is that the Oracle Server is not allowed to access any web site (Oracle server is in inhouse network with no access allowed to the world outside). So I can't store the XML in an XML-type column, as the Oracle server wants to validate the XML against the referenced DTD. There is an option not to validate the XML. But then I get the error when I try to access the XML afterwards. So up to now I use a CLOB column to store the XML, but then I lose all the benefits of an XML-type column. Is there any workaround?
    TIA,
    Stefan

    In 10.2.0.2.0 The following works
    SQL> drop table TEST_XML
      2  /
    Table dropped.
    SQL> create table TEST_XML (
      2     XML_SEQ number(10) not NULL,
      3     XML_DOC XMLType not NULL
      4  )
      5  /
    Table created.
    SQL> drop sequence TEST_XML_SEQ
      2  /
    Sequence dropped.
    SQL> create sequence TEST_XML_SEQ
      2  /
    Sequence created.
    SQL> create or replace view V_EMP_XML as select
      2         -- Processing Instruction
      3         '<?xml version="1.0" encoding="ISO-8859-1"?>' ||
      4         -- DTD reference
      5         '<!DOCTYPE employees SYSTEM "http://myserver/dtd/employees.dtd">' ||
      6         SYS.XMLTYPE.getClobVal(
      7            XMLElement("employees",
      8               (select XMLAgg(
      9                          XMLElement("emp",
    10                             XMLAttributes(
    11                                e.EMPNO as "empno",
    12                                e.DEPTNO as "deptno"
    13                             ),
    14                             XMLElement("ename", e.ENAME),
    15                             XMLElement("job", e.JOB),
    16                             XMLElement("salary", e.SAL),
    17                             XMLElement("hiredate", to_char(e.HIREDATE, 'YYYY-MM-DD'))
    18                          )
    19                       order by e.EMPNO
    20                       )
    21                from   SCOTT.EMP e
    22               )
    23            )
    24         ) as XML_DOC
    25  from   DUAL
    26  /
    View created.
    SQL>
    SQL> insert into TEST_XML
      2  (
      3    XML_SEQ,
      4    XML_DOC
      5  )
      6  select TEST_XML_SEQ.NEXTVAL,
      7         XMLType(v.XML_DOC, NULL, 1, 1)
      8  from   V_EMP_XML v
      9  /
    1 row created.
    SQL> select t.XML_DOC.getClobVal() as RESULT
      2  from   TEST_XML t
      3  where  t.XML_SEQ = 1
      4  /
    RESULT
    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE employees SYSTEM "http://my
    SQL> select extract(t.XML_DOC, '//emp[@deptno=20]').getClobVal() as RESULT
      2  from   TEST_XML t
      3  where  t.XML_SEQ = 1
      4  /
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00202: could not open "http://myserver/dtd/employees.dtd" (error 101)
    Error at line 1
    no rows selected
    SQL> alter session set events ='31156 trace name context forever, level 2'
      2  /
    Session altered.
    SQL> select extract(t.XML_DOC, '//emp[@deptno=20]').getClobVal() as RESULT
      2  from   TEST_XML t
      3  where  t.XML_SEQ = 1
      4  /
    RESULT
    <emp empno="7369" deptno="20"><ename>SMITH</ename><job>CLERK</job><salary>800</s
    SQL>

  • Versioning document in XML type coloumn

    Hi All,
    I have a specific requirement in my product.I have to version the data entered in XML type coloumn. I tried searching in google and oracle 9i doc but I got the information for versioning the document stored under a partcular directory using resource_view not for my set of requiremets.
    Here I am giving more info:
    created a table abcd(int id , xmlcol XMLType)
    and associated a schema for this coloumn.Inserted data in xml format in the coloumn. I need to create different version of this data in xml type coloumn with new id.
    If any of you worked on this / have some idea abt how to proceed will be very helpful to me...
    Thanks in advance,
    Cheers
    Somasekar.

    Hi
    I am looking for some information for versioning the XMLType Column defined in the schema. The data inserted into the XML Type column will adhere to same schema.
    Can anyone help me or point me to some information.
    Thanks

  • Help  needed  in inserting  into column  of XML type

    i have requirement of inserting data into column of xml type
    eg
    cust product cost
    1 a 3
    1 b 7
    1 c 5
    now required result should
    <PROD-LIST>
    <a>3</a>
    <b>7</b>
    <c>5</c>
    </PROD-LIST>
    Please let me know how to achieve this , i was trying write function , it was working for one values ,but how to do if many values exist .

    Take a deep breath, then retype this putting in all the words and punctuation you missed out the first time until it makes sense.
    Your sample data, for example, could be better formatted using the [pre] and [/pre] tags to preserve formatting and put in a table format. Similarly with your output. Why are two of the numbers floating around freely in your xml but the 3rd isn't?

  • XML TYPE BNULL UPDATION

    Sir,
    I have XML content in a xml type identifier as shown below.
    </VitalSummary>
    <VitalMngId/>
         <FacilityTypeId>11</FacilityTypeId>
         <VitalLatesetMngRev>1</VitalLatesetMngRev>
         <VitalFrameId>0</VitalFrameId>
         <MeasureDateTime>20060707163420</MeasureDateTime>
         <CreatePractitioner>20060707163420</CreatePractitioner>
         <CreateDateTime>20060707163420</CreateDateTime>
         <DeleteFlag>0</DeleteFlag>
         <ConnectionNumber>0</ConnectionNumber>
         <PatientId>ANH1</PatientId>
         <ToUpdateFlag>true</ToUpdateFlag>
         <UpdatePractitioner>PRA1</UpdatePractitioner>
         <UpdateDateTime>20060707163420</UpdateDateTime>
    </VitalSummary>
    I want to know how I can set the value to the node <VitalMngId/> which is null.I can set value to other nodes using the code as shown below in a oracle Stored procedure.
    PROCEDURE SET_VitalSummary(VitalSummary IN OUT xmltype);
    TnodelistVitFID dbms_xmldom.DOMNodeList;
    TnodeVitFID dbms_xmldom.DOMNode;
    TnodelistVitMngId dbms_xmldom.DOMNodeList;
    TnodeVitMngId dbms_xmldom.DOMNode;
    Tdoc := dbms_xmldom.newDOMDocument(VitalSummary);
    TnodelistVitFID := xslprocessor.selectNodes(dbms_xmldom.makeNode(Tdoc),'/VitalSummary/FacilityTypeId');
    TnodeVitFID := dbms_xmldom.item(TnodelistVitFID , 0);
    dbms_xmldom.setData(dbms_xmldom.getFirstChild(TnodeVitFID), '55');
    I can change the value of <FacilityTypeId> from 11 to 55.
    But I can't change the value of <VitalMngId> using the code as shown below because it is null
    TnodelistVitMngId := xslprocessor.selectNodes(dbms_xmldom.makeNode(Tdoc),'/VitalSummary/VitalMngId');
    TnodeVitMngId := dbms_xmldom.item(TnodelistVitMngId, 0);
    dbms_xmldom.setData(dbms_xmldom.getFirstChild(TnodeVitFID), '10');
    Can you inform me how i can set a value to xml node if it is null.
    Regards,
    Aneesh Kumar.P

    Hi,
    I got the Solution .Updation of the required xml null node in my example can be perform using the following statement
    TnodeVitMngId := xmldom.appendChild(TnodeVitMngId, xmldom.makeNode(xmldom.createTextNode(Tdoc, '10')));
    Regards,
    Aneesh Kumar.P
    Message was edited by:
    user525828

  • Update XML data stored in CLOB Column

    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

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • How to update a BLOB column in a table with a file in local machine?

    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard. Appreciate your help.
    Regards
    Walter Nicholas

    user447427 wrote:
    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard.That's the client's job to read data on the client PC (from keyboard/mouse/scanner/file/whatever input) and submit that to the database server for processing and/or storage.
    You cannot expect the server to hack into your PC and lift that data in the file from your disk. Not that is not technically possible. You can wire rockets onto a bicycle to make it go faster, but that's not a wise thing to do. Similarly, it is not a bright idea to ignore the very basics of client-server.
    Bottom line - you need client s/w on your PC to load the content of that file into Oracle. It can be done using SQL*Loader as already suggested. It can be done using a web browser (submitting it via HTTP to web-enabled PL/SQL code). You can use FTP or WebDav and upload into Oracle's XDB (XML database).
    Your requirements will determine what client to use. Once off load? SQL*Loader is very easy to use for loading XML files into the database.

Maybe you are looking for

  • Music app won't sort albums by artist

    On my iPad 3rd Gen, after the 8.0 update, the "Group By Album Artist" check box in the Settings no longer works.  It used to group the albums in the Music app by the associated Artist, but now it just alphabetizes them regardless of the artist. I've

  • AD Replication Not Working - Last error: 1256 (0x4e8):

    Hi, We have one DC and ADC which is running on the same premises.  Few days back the ADC got power failure and after that long it thrown an error of some services are not started.  We checked the event viewer to find out the service failed but not fo

  • Remote Domain Join Error - no endpoint listening at CertWebservice.svc

    I am trying to remotely connect a windows 8.1 client to a Windows Server 2012 Essentials domain.  I do this by navigating to: https://remote.mydomainname.com/connect/ The connector downloads and starts fine but after user authentication, fails with t

  • Monetizing OS X and other Apple software tutorials on Youtube?

    Hello community! I have a howto video of OS X Lion up on Youtube that has reached almost 60,000 views and I plan to do lots more, because there often seem to be things that somebody hasn't done a video on and I simply like making howtos. Also, I'm a

  • HP Scanjet 4670 compatibility

    I am seeking a software driver compatible with Mavericks (OS X 10.9) to run my old but grea HP Scanjet 4670. When I installed Maverick, it announced that it was not compatible with the one previously installed.