Updating clob in pl sql

SELECT extract(OBJECT_VALUE, '/Purchase Order/Actions/Action[1]') ACTION FROM purchaseorder WHERE exists Node(OBJECT_VALUE,'/Purchase Order[Reference="SBELL-2002100912333601PDT"]') = 1; ACTION --------------------------------- SELECT extract Value(OBJECT_VALUE, '/Purchase Order/Requestor') NAME, extract(OBJECT_VALUE, '/Purchase Order/Line Items') LINEITEMS FROM purchaseorder WHERE exists Node(OBJECT_VALUE, '/Purchase Order[Reference="SBELL-2002100912333601PDT"]') = 1; NAME LINEITEMS ---------------- ------------------------------------------------------------------------ Sarah J. UPDATE purchaseorder SET OBJECT_VALUE = update XML(OBJECT_VALUE, '/Purchase Order/Requestor/text()', 'Stephen G.King', '/Purchase Order/Line Items/Line Item[1]/Part/@Id', '786936150421', '/Purchase Order/Line Items/Line Item[1]/Description/text()', 'The Rock', '/Purchase Order/Line Items/Line Item[3]', XMLType('')) WHERE exists Node(OBJECT_VALUE, '/Purchase Order[Reference="SBELL-2002100912333601PDT"]') = 1; 1 row updated.

updating clob in pl sql-24

CREATE TABLE purchaseorder_lineitem (reference, FOREIGN KEY ("REFERENCE") REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE, lineno NUMBER(10), PRIMARY KEY ("reference", "lineno"), upc VARCHAR2(14), description VARCHAR2(128), quantity NUMBER(10), unitprice NUMBER(12,2)); Table created.If the proper return type cannot be determined, then Oracle XML DB returns a SELECT extract Value(OBJECT_VALUE, '/Purchase Order/Reference') "REFERENCE" FROM purchaseorder WHERE exists Node(OBJECT_VALUE, '/Purchase Order[Special Instructions="Expedite"]') = 1; REFERENCE ------------------------------------------------------------ AMCEWEN-20021009123336271PDT SKING-20021009123336321PDT AWALSH-20021009123337303PDT JCHEN-20021009123337123PDT AWALSH-20021009123336642PDT SKING-20021009123336622PDT SKING-20021009123336822PDT AWALSH-20021009123336101PDT WSMITH-20021009123336412PDT AWALSH-20021009123337954PDT SKING-20021009123338294PDT WSMITH-20021009123338154PDT TFOX-20021009123337463PDT 13 rows selected.INSERT INTO purchaseorder VALUES (XMLType(bfilename('XMLDIR', 'SMCCAIN-2002091213000000PDT.xml'), nls_charset_id('AL32UTF8'))); 1 row created.Each of these functions applies an XPath-expression argument to input XML data and returns a modified to modify database data.Each of these functions can be used on XML documents that are either schema-based or non-schema-based.

Leave a Reply