Update or delete table from XML

Is it possible to update or delete table's row from XML file?
Thanks
Prasanta De

Hi Steve,
Thanks for your reply but I could not find any example from the documentation for update-request or delete-request. I need your help in this regards.
1. I have emp table with many rows and the simple structure like this
DEPTNO NUMBER(2)
EMPNO NUMBER(2)
EMPNAME VARCHAR2(20)
EMPSAL NUMBER(8,2)
Key is defined on deptno and empno
2. I have a xml file like this
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<DEPTNO>1</DEPTNO>
<EMPNO>11</EMPNO>
<EMPSAL>1111.11</EMPSAL>
</ROW>
<ROW num="2">
<DEPTNO>1</DEPTNO>
<EMPNO>12</EMPNO>
<EMPSAL>2222.22</EMPSAL>
</ROW>
<ROW num="3">
<DEPTNO>1</DEPTNO>
<EMPNO>13</EMPNO>
<EMPSAL>3333.33</EMPSAL>
</ROW>
</ROWSET>
3. I want that xsql servlet will read this xml file and update EMPSAL column depending upon the value of DEPTNO and EMPNO from xml file.
Please let me know how I should use update-request in xsql page.
Thanks
Prasanta De
null

Similar Messages

  • Please help me in inserting data into table from XML message.

    Hi Experts,
    Please provide a procedure to implement my below requirement.
    Since I am new to queue concept.
    [code]- <MESSAGES>
    - <MESSAGE ID="3026900">
      <MSG_ID>3026900</MSG_ID>
      <DT_POSTED>6/20/2013 08:15:48</DT_POSTED>
      <POSTED_BY>GPD_MSG_EXTRACTOR</POSTED_BY>
      <DT_LAST_QUEUED />
    - <MSG>
    - <WORK_SET TRANSACTION_ID="@TRANS_ID" TRANSACTION_TYPE="Batch" IS_ACID="@IS_ACID">
    - <WORK_UNIT GROUP="LEAD_TIME" ACTION="UPDATE" AFFECTED="LEAD_TIME">
    - <RECORDSET TABLE_NAME="LEAD_TIME">
    - <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
    - <rs:data>
      <z:row business_unit_id="3838" geo="AT" sku="A0814818" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      <z:row business_unit_id="202" geo="GB" sku="A0814819" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      <z:row business_unit_id="2828" geo="BE" sku="A0814820" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      </rs:data>
      </xml>
      </RECORDSET>
      </WORK_UNIT>
    - <WORK_UNIT GROUP="LEAD_TIME" ACTION="ADD" AFFECTED="LEAD_TIME">
    - <RECORDSET TABLE_NAME="LEAD_TIME">
    - <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
    - <rs:data>
      <z:row business_unit_id="202" geo="GB" sku="A0814821" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      <z:row business_unit_id="2828" geo="BE" sku="A0814822" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      </rs:data>
      </xml>
      </RECORDSET>
      </WORK_UNIT>
    - <WORK_UNIT GROUP="LEAD_TIME" ACTION="DELETE" AFFECTED="LEAD_TIME">
    - <RECORDSET TABLE_NAME="LEAD_TIME">
    - <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
    - <rs:data>
      <z:row business_unit_id="202" geo="GB" sku="A0814817" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      <z:row business_unit_id="2828" geo="BE" sku="A0814816" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
      </rs:data>
      </xml>
      </RECORDSET>
      </WORK_UNIT>
      </WORK_SET>
      </MSG>
      </MESSAGE>
      </MESSAGES>[/code]
    The above XML message is receieved by our oracle queue.Once the message is receieved to our queue.
    We have to process the message according to the action(UPDATE ADD DELETE).
    From this message we have to process only 3 fields (geo  sku lead_time).
    These three feilds data should be processed into the SKU_LEAD_TIME table based on the action.
    Req1:
    IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
    IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
    based on the below condition.
    [code]UPDATE LEAD_TIME_TABLE SET lead_time= lead time from xml message
    WHERE LEAD_TIME_TABLE.SKU=sku from xml message AND LEAD_TIME_TABLE.GEO=geo from xml message;[/code]
    Req2:
    IF the action is delete then the records should be deleted from the "LEAD_TIME_TABLE" table.
    based on the below condition.
    [code]DELETE FROM LEAD_TIME_TABLE
    WHERE LEAD_TIME_TABLE.SKU=sku from xml message AND LEAD_TIME_TABLE.GEO=geo from xml message;[/code]
    Req3:
    IF the action is add then the records should be inserted in the "LEAD_TIME_TABLE"  and "LEAD_TIME_TABLE_STAGING" table
    based on the below conditions.
    Req3.1:
    If SKU from XML message is available in "SKU_TABLE" table
    then the three parameter(GEO SKU LEAD_TIME) values from XML message should be inserted into "LEAD_TIME_TABLE" table.
    Req3.2:
    If SKU from XML message is not available in "SKU_TABLE" table
    then the three parameter(GEO SKU LEAD_TIME) values from XML message should be inserted into "LEAD_TIME_TABLE_STAGING" table.
    Req3.3:
    Once the new SKU is avilable in "SKU_TABLE" table then the corresponding SKU record should be
    inserted into "LEAD_TIME_TABLE" table and that record should be deleted from  "LEAD_TIME_TABLE_STAGING" table.
    I am posting required scripts and test cases.
    [code]CREATE TABLE LEAD_TIME_TABLE(sku VARCHAR2(20),model VARCHAR2(20),class CHAR(1),geo VARCHAR2(6),lead_time NUMBER,created DATE);
    CREATE TABLE LEAD_TIME_TABLE_STAGING(sku VARCHAR2(20),geo VARCHAR2(6),lead_time NUMBER);
    CREATE TABLE SKU_TABLE(sku VARCHAR2(20),geo VARCHAR2(6),lead_time NUMBER);
    INSERT INTO SKU_TABLE VALUES('A0814817','GB',30);
    INSERT INTO SKU_TABLE VALUES('A0814818','AT',30);
    INSERT INTO SKU_TABLE VALUES('A0814819','GB',30);
    INSERT INTO SKU_TABLE VALUES('A0814820','BE',30);
    INSERT INTO SKU_TABLE VALUES('A0814821','GB',30);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814817','GB',30);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814818','AT',20);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814819','GB',20);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814820','BE',20);
    INSERT INTO LEAD_TIME_TABLE_STAGING VALUES('A0814822','BE',30);[/code]
    From the above message.
    Test case for req3.1:
    The action for SKU numbers "A0814821"  "A0814822" are insert.
    The SKU number  "A0814821" is available in SKU_TABLE table.
    so the record should be inserted in the LEAD_TIME_TABLE.
    [code]SELECT * FROM LEAD_TIME_TABLE;
    SKU        GEO   LEAD_TIME
    A0814817    GB    30
    A0814818    AT    20
    A0814819    GB    20
    A0814820    BE    20
    A0814821    GB    30[/code]
    Test case for req3.2:
    The action for SKU numbers "A0814821"  "A0814822" are insert.
    The SKU number  "A0814822" is not available in SKU_TABLE table.
    so the record should be inserted in the LEAD_TIME_TABLE_STAGING.
    [code]SELECT * FROM LEAD_TIME_TABLE_STAGING;
    SKU        GEO   LEAD_TIME
    A0814822    BE     30[/code]
    Test case for req3.3:
    The action for SKU numbers "A0814821"  "A0814822" are insert.
    The SKU number  "A0814822" is not available in SKU_TABLE table.
    Once I insert SKU number "A0814822" in SKU_TABLE table.
    The corresponding records automatically should be inserted in the LEAD_TIME_TABLE
    and should be deleted from LEAD_TIME_TABLE_STAGING.
    [code]SELECT * FROM LEAD_TIME_TABLE_STAGING;  --- should return NULL.
    SELECT * FROM LEAD_TIME_TABLE;
    SKU        GEO   LEAD_TIME
    A0814817    GB    30
    A0814818    AT    20
    A0814819    GB    20
    A0814820    BE    20
    A0814821    GB    30
    A0814822    BE    30[/code]
    Please help me.
    Thanks in advance.

    Hi,
    I have resolved this issue.
    But I have stuck up in implementing some of the scenarios.
    Req1:
    IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
    IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
    based on the below condition.
    UPDATE LEAD_TIME_TABLE SET lead_time= lead time from xml message
    WHERE LEAD_TIME_TABLE.SKU=sku from xml message AND LEAD_TIME_TABLE.GEO=geo from xml message;
    Req3:
    IF the action is add then the records should be inserted in the "LEAD_TIME_TABLE"  and "LEAD_TIME_TABLE_STAGING" table
    based on the below conditions.
    Req3.1:
    If SKU from XML message is available in "schema_name.SKU_TABLE" table.
    The schema_name.SKU_TABLE table should be selected based on "business_unit_id" of XML message and "sid" of MAPPING table WHERE business_unit_id=sid.
    then the three parameter(GEO SKU LEAD_TIME) values from XML message and two fields MODEL,CLASS from SKU_TABLE
    should be inserted into "LEAD_TIME_TABLE" table.
    Req3.2:
    If SKU from XML message is not available in "schema_name.SKU_TABLE" table
    The schema_name.SKU_TABLE table should be selected based on "business_unit_id" of XML message and "sid" of MAPPING table WHERE business_unit_id=sid.
    then the four parameter(BUSINESS_UNIT_ID GEO SKU LEAD_TIME) values from XML message
    should be inserted into "LEAD_TIME_TABLE_STAGING" table.
    Req3.3:
    Once the new SKU is avilable in "schema_name.SKU_TABLE" table then the corresponding SKU record should be
    inserted into "LEAD_TIME_TABLE" table and that record should be deleted from  "LEAD_TIME_TABLE_STAGING" table.
    The schema_name.SKU_TABLE table should be selected based on "business_unit_id" of LEAD_TIME_TABLE_STAGING and "sid" of MAPPING table WHERE business_unit_id=sid.
    I am posting required scripts and test cases.
    [code]CREATE TABLE LEAD_TIME_TABLE(sku VARCHAR2(20),model VARCHAR2(20),class CHAR(1),geo VARCHAR2(6),lead_time NUMBER,created DATE);
    CREATE TABLE LEAD_TIME_TABLE_STAGING(business_unit_id NUMBER,sku VARCHAR2(20),geo VARCHAR2(6),lead_time NUMBER);
    CREATE TABLE SKU_TABLE(sku VARCHAR2(20),model VARCHAR2(20),class VARCHAR2(10));
    CREATE TABLE mapping(sid NUMBER,schema_name VARCHAR2(20));
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814817','GB',30);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814818','AT',20);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814819','GB',20);
    INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814820','BE',20);
    INSERT INTO SKU_TABLE VALUES('A0814817','M125','C111');
    INSERT INTO SKU_TABLE VALUES('A0814818','M127','A111');
    INSERT INTO SKU_TABLE VALUES('A0814819','M126','A111');
    INSERT INTO SKU_TABLE VALUES('A0814820','N100','B111');
    INSERT INTO SKU_TABLE VALUES('A0814821','P123','B111');
    INSERT INTO mapping VALUES(202,'WEDB');
    INSERT INTO mapping VALUES(2828,'HR');
    INSERT INTO mapping VALUES(3838,'BB');
    [/code]
    Test case for req3.1:
    The action for SKU numbers "A0814821"  "A0814822" are insert.
    The SKU number  "A0814821" is available in schema_name.SKU_TABLE table.
    so the record should be inserted in the LEAD_TIME_TABLE.
    [code]SELECT * FROM LEAD_TIME_TABLE;
    SKU        MODEL  CLASS  GEO   LEAD_TIME
    A0814817    M125   C111   GB     30
    A0814818    M127   A111   AT     20
    A0814819    M126   A111   GB     20
    A0814820    N100   B111   BE     20
    A0814821    P123   B111   GB     30
    [/code]
    Test case for req3.2:
    The action for SKU numbers "A0814821"  "A0814822" are insert.
    The SKU number  "A0814822" is not available in SKU_TABLE table.
    so the record should be inserted in the LEAD_TIME_TABLE_STAGING.
    [code]SELECT * FROM LEAD_TIME_TABLE_STAGING;
    BUSINESS_UNIT_ID       SKU        GEO   LEAD_TIME
    2828               A0814822    BE     30[/code]
    Test case3.3.3:
    The action for SKU numbers "A0814821"  "A0814822" are insert.
    The SKU number  "A0814822" is not available in SKU_TABLE table.
    Once I insert SKU number "A0814822" in SKU_TABLE table.
    The corresponding records automatically should be inserted in the LEAD_TIME_TABLE
    and should be deleted from LEAD_TIME_TABLE_STAGING.
    [code]INSERT INTO SKU_TABLE VALUES('A0814822','P123','B111');
    SELECT * FROM LEAD_TIME_TABLE_STAGING;  --- should return NULL.
    SELECT * FROM LEAD_TIME_TABLE;
    SKU        MODEL  CLASS  GEO   LEAD_TIME
    A0814817    M125   C111   GB     30
    A0814818    M127   A111   AT     20
    A0814819    M126   A111   GB     20
    A0814820    N100   B111   BE     20
    A0814821    P123   B111   GB     30
    A0814822    P123   B111   GB     30[/code]
    I am able to implement Req1 and Req3.1 for action UPDATE and INSERT in single merge statement.
    However my code is not taking care of all my requirements.
    Please find my below code.
    [code]   CREATE OR REPLACE PACKAGE BODY messg_values_process
       AS
        procedure ProcessInboundLtimeMessage(p_xml_message XmlType)
        is
        begin
            for work_unit in (
                select message.MESSAGE_ID
                     , work_unit.ACTION
                     , work_unit.LEADTIME_NODES
                  from XmlTable(
                        '/MESSAGES/MESSAGE'
                        passing p_xml_message
                        columns
                            MESSAGE_NO          for ordinality
                          , MESSAGE_ID          number path '@ID'
                          , WORK_UNIT_NODES     XmlType path 'MSG/WORK_SET/WORK_UNIT'
                       ) message
                     , XmlTable(
                        XmlNamespaces(
                            'urn:schemas-microsoft-com:rowset' as "rs"
                          , '#RowsetSchema' as "z"
                        '/WORK_UNIT'
                        passing message.WORK_UNIT_NODES
                        columns
                            WORK_UNIT_NO        for ordinality
                          , ACTION              varchar2(10 char) path '@ACTION'
                          , LEADTIME_NODES       XmlType path 'RECORDSET[@TABLE_NAME="LEAD_TIME"]/xml/rs:data/z:row'
                       ) work_unit
        LOOP
                CASE work_unit.ACTION
                  WHEN 'ADD'    THEN MergeData(work_unit.LEADTIME_NODES);
                  WHEN 'UPDATE' THEN MergeData(work_unit.LEADTIME_NODES);
                  WHEN 'DELETE' THEN RemoveData(work_unit.LEADTIME_NODES);
                  ELSE null;
                END CASE;
            END LOOP;
        END ProcessInboundLtimeMessage;
            procedure MergeData(p_leadtime_nodes XmlType)
        is
        begin
            if (p_leadtime_nodes is not null) then
                merge into LEAD_TIME_TABLE old
                using(
                    select *
                      from XmlTable(
                            XmlNamespaces(
                                'urn:schemas-microsoft-com:rowset' as "rs"
                              , '#RowsetSchema' as "z"
                            '/z:row[not(@business_unit_id=following-sibling::z:row/@business_unit_id)]'
                            passing p_leadtime_nodes
                            columns
                                ITEM_NO             for ordinality
                              , BUSINESS_UNIT_ID    number path '@business_unit_id'
                              , GEO                 varchar2(20 char) path '@geo'
                              , SKU                 varchar2(20 char) path '@sku'
                              , LEAD_TIME           number path '@lead_time'
                ) NEW
                   ON (old.VK_UNIT = new.SKU
                  AND old.GEO=new.GEO)
                when matched then update
                   set old.LEAD_TIME = new.LEAD_TIME
                when not matched then INSERT
                     ( old.VK_UNIT
                     , old.MODEL
                     , old.CLASS
                     , old.GEO
                     , old.LEAD_TIME
                     , old.COUNTDOWN
                     , old.LAST_UPDATED_DATE
                     values
                     ( new.SKU
                     ,'A123'
                     ,'A1234'
                     , new.GEO
                     , new.LEAD_TIME
                     , 'N'
                     , sysdate
            end if;
             exception
            when others then
                LogDataError(
                    'MergeData Procedure Failed #: '||chr(10)||sqlerrm
                  , null
                  , null
        END MergeData;
    END messg_values_process;
    /[/code]
    Please help me.
    Thanks.

  • What's the exact trigger for when updating/inserting/deleting data from one DB to another DB which contains same info?

    Hi guys,
    I have created a copy of the AdventureWorks2012 DB called AdventureWorks2012_new on the same instance.
    I have created the following trigger below but my friend who is a DBA told me that this is not correct and I should be using the inserted table when creating this trigger. I would like AdventureWorks2012_new DB to be updating/inserting/deleting data from
    the same tables that have been updated/inserted/deleted in the AdventureWorks2012 DB. How exactly should I do this for all the tables in the whole database ? What I have written below is just for one of the tables, is there a quicker way to do it for all tables
    in this DB so that it performs the actions mentioned above, automatically ? Help would be greatly appreciated so I can understand how this works, thanks
    CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterUpdate]
    ON [AdventureWorks2012].[HumanResources].[Department]
    AFTER UPDATE
    AS
    BEGIN
    SET NOCOUNT ON;
    UPDATE AdventureWorks2012_new.HumanResources.Department
    SET Name = t2.Name,
    GroupName = t2.GroupName,
    ModifiedDate = t2.ModifiedDate
    FROM AdventureWorks2012.HumanResources.Department AS t2
    INNER JOIN AdventureWorks2012_new.HumanResources.Department AS t1
    ON t2.DepartmentID = t1.DepartmentID
    END

    For insert it's easy:
    CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterInsert]
    ON [AdventureWorks2012].[HumanResources].[Department]
    AFTER INSERT
    AS
    BEGIN
    SET NOCOUNT ON;
    Insert INTO AdventureWorks2012_new.HumanResources.Department
    (DepartmentID, Name, GroupName, ModifiedDate)
    SELECT DepartmentID, Name, GroupName, ModifiedDate
    FROM Inserted;
    END
    I didn't verify column names, so you may need to make sure to use correct column names for that table.
    Setting replication is a bit advanced topic although BOL is clear and you may start here
    http://technet.microsoft.com/en-us/library/ms151198.aspx
    If it will be complicated for you, you can ask extra questions in the MSDN Replication forum.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Update the z table from the header text of VF01 on save

    Hi All,
    I have a  Z table 'ZEXIM_LICDETAILS'. Whenever a billing doc. of type 'ZEXP' is created with tcode VF01, the Z table fields should also be updated. I have learned that we cannot include tabs in Billing Doc, so the licence number is put in the header text of the VF01.
    Is there any way that I can update my Z table from header text, when we save the VF01.
    Waiting for your repy in anticipation.
    Thanks a lot in advance,
    Anu

    Write code in USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
    Reddy

  • Insert data into oracle table from XML file

    I need to insert data into oracle table from XML file
    If anybody handled this type of scenario, Please let me know how to insert data into oracle table from XML file
    Thanks in advance

    The XML DB forum provides the best support for XML topics related to Oracle.
    Here's the FAQ on that forum:
    XML DB FAQ
    where there are plenty of examples of shredding XML into Oracle tables and such like. ;)

  • Updating a standard table from a custom tableq

    hi to all experts,
    My requirement is to update a standard table from the maintenance screens of the custom table whatever the data the user maintains in the custom table and save should automatically saved in the standard table
    for that i decided to use the table maintenance events (event 05 ) ( while saving data) how to capture the data from the screens to the form of the table maintenance events.

    Hi gautham,
    The requirement is like that actually user want to maintain value in z table ( with one extra field ) . the table updation of table is important

  • Using Java, How can I Update, Add, Delete nodes in XML Files.

    Hi,
    I want to store the student record (like Name, Age, school name, total mark etc.,) as nodes in the XMLfile. Also I should able to Update, Add, Delete any nodes (student record) in the XML file. How can I achieve this...using Java
    I am able to read the content of the xml file using xml-parser. But my problem is
    updating the xml file.
    pls suggest some solutions or links with " example source code"
    Thanks :-)

    There are 2 kinds of XML parsers : SAX and DOM. DOM seems to suit your need. You can use JAXP APIs to add, delete or change nodes or attributes.
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html provides contents that would satisfy most of the needs.
    To save a DOM modified XML file use java IO APIs to write to the same file from which it was read using a Document object ( doc.getNodeValue() ).

  • Updates to the table from the database level.

    Hi Dear All,
    If we do some updates to the table at the Database Level, like i deleted some records from the table at the Oracle level. But I'm still able to see the same deleted records from the Data Dictionary(SE11) at the application level.
    Can you pl explain the mechanism, that how it is possible and why.
    best regards
    Mahesh

    transparent tables store data directly....if you delete some data from transparent tables, the same is reflected in the database (oracle) but the reverse is not true...if you modify the database table contents directly...the dictionary table remains intact...
    transparent tables have a one-to-one relationship with the database tables....
    hope that clarifies a bit....
    (somebody correct me if i am horribly wrong)

  • Load table from xml

    Hi all
    Please see attach that I send ,, this is vi that write and read from xml file ,, my problem is when I press on load ??
    If you can see that I saved a table data  , I want if I press on load bottom  all the data loaded on the screen  in table shape as table control
    Who can I do that
    Note : press on set limit to save into xml file
    Thanks
    Attachments:
    loadTable.vi ‏28 KB

    Hi elyan
    As i can see you still have problems with xml files
    The for loop is not neened. Just delete it.
    At write buid an array, so at read you can select 1st element.
    At Unflatten from xml, wire a 2D array at "type" input.
    You  must have a look at basic Labview tutorials...

  • Update/insert/delete data from xcelsius to Database via web service

    Hi,
    I need to create dashboard that go function can <b>update/insert/delete</b> data send to <u>Database</u> thru <u>web services</u>, as i know got 2 xcelsius add-on software which support those of function <b>InfoBurst</b> and <b>flynet </b>
    <b>InfoBurst</b>
    http://www.infosol.com/azbocug/minutes/4-Writeback%20to%20a%20Database%20with%20Xcelsius.pdf
    <b>flynet </b>
    http://www.flynetviewer.com/public/community/Blogs/FlynetXcelsiusServerUser/default.aspx
    Except this 2 purchase add-on xcelsius, any other solution ?  
    Maybe need to write some in MSSQL or C# programming which enable insert, update, delete ...etc  ?
    *note: i not use Xcelsius Engage Server , i use Xcelsius Engage only
    thanks,
    regards
    s1
    Edited by: Leong Pui Kee on Mar 1, 2011 6:06 AM

    Hi,
    As of now in Xcelsius/Dashboard Design there is no feature or functionality to insert/update/delete data from database.
    Solution:
    Create a Web service in let’s say C# or Java, which will perform insert/update/delete operation.
    In Xcelsius add Web Service connection and user above web service.
    Xcelsius Web Service connection provides option to pass input values to a Web Service (Input Pane) and get the result (Output values pane).
    We can pass values to be written to the database as a input to Web Service via Web Service connection from Xcelsius and write data to the database.
    Note:
    Performing delete operation from Xcelsius Dashboard could be risky and may delete important data from database. I would not prefer giving delete option/functionality in Xcelsius dashboard.
    Hope this helps!
    Thank you.
    Regards,
    Vinay Mhaske

  • No. of containers not updating in QALS table from goods receipt

    Hi all,
    I am working on below requirement for client.
    I am releasing a process order and then saving it. With this, an inspection lot is created in QALS table automatically.
    Then I am doing Goods receipt through MIGO.
    While doing goods receipt, I am entering no. of containers in quantity tab on item level (GOITEM-ANZGEB), but the same is not getting updated in QALS table (QALS-ANZGEB).
    Is there any configuration setting needs to be done to activate the update of no. of containers in QALS table from MIGO transaction?
    P.S. - Sometimes we use MB31 also to do goods receipt. In that also, there is no. of containers field.
    Thanks in advance,
    Sachin

    Hi Sachin,
    what is the solution for this .? Can you explain?
    Ram

  • Update Columns in Table from Other Table based on Fund Code

    Hello All!!
    Hope you are doing good!!!
    I like to update 5 columns in X Table based on fund_code. The Fund code and 5 column values come from Y Table. Please let me know how to wirte a sql statement to update all values for 5 columns in X Table. Please post me any template code.
    Thanks.

    I think you are looking for an updatable join,
    Please see the syntax below,
    UPDATE (SELECT b.col1
              FROM table1 b, table2 E
             WHERE b.col_pk = E.col_pk) T
       SET T.col1 = 0Thanks,
    G.

  • 3.2.3 Update To delete photos from photostream

    All the software is updated. Aperture 3.2.3. iOS 5.1. 
    Aperture updates suggests that you can delete photos from photostream and it will delete the same pictures on all devices.
    I can delete the pictures, but it doesn't delete the pictures on my other devices.
    Any suggestions?

    As Clem says... but if that doesn't fix everything, some people have had to go to iCloud.com and clear the Photo Stream (you can only clear the whole thing there). But if you need to do this, first make sure all your Photo Stream images are saved somewhere. You can add them back once you've cleared it.
    This ApertureExpert thread describes what I'm talking about.

  • Need to update column in table from joining the two tables

    Hi
    i want to update a table by joining two table but i m getting the below error
    single row subquery returns more than one value.
    i m using following query
    update table2
    set deposite_date=(select a.deposit_date from table1 a,table2 b
    where a.ban=b.ban and (a.deposit_date between b.cy_start_date and b.due_date))
    table2
    ban due_date cy_start_date deposite_date
    100 5/6/2011 22/05/2011
    101 7/11/2011 22/05/2011
    102 5/25/2011 22/05/2011
    table1
    ban      deposit_date
    100      04/12/2011
    100      04/15/2011
    102      03/25/2011
    101      04/26/2011
    101      05/06/2011
    101      07/26/2011
    can i insert latest deposit_date from table1 which lies between b.cy_start_date and b.due_date
    Thanks

    Hi,
    Welcome to the forum!
    876466 wrote:
    Hi
    i want to update a table by joining two table but i m getting the below error
    single row subquery returns more than one value.Exactly!
    (   SELECT  a.deposit_date
        FROM    ...returns all deposit_dates.
    (   SELECT  MAX (a.deposit_date)
        FROM    ...would return only the latest one.
    Also, you need to correlate the sub-query to the main query, so that it only looks for rows with the same ban.
    i m using following query
    update table2
    set deposite_date=(select a.deposit_date from table1 a,table2 b
    where a.ban=b.ban and (a.deposit_date between b.cy_start_date and b.due_date))
    table2
    ban due_date cy_start_date deposite_date
    100 5/6/2011 22/05/2011
    101 7/11/2011 22/05/2011
    102 5/25/2011 22/05/2011
    table1
    ban      deposit_date
    100      04/12/2011
    100      04/15/2011
    102      03/25/2011
    101      04/26/2011
    101      05/06/2011
    101      07/26/2011
    can i insert latest deposit_date from table1 which lies between b.cy_start_date and b.due_datePerhaps you need something like this:
    UPDATE  table2     b
    SET     deposit_date     =
             (    SELECT  MAX (a.deposit_date)
                   FROM      table1           a
               WHERE      a.ban          = b.ban
               AND      a.deposit_date BETWEEN b.cy_start_date
                               AND     b.due_date
    ;Notice that table1 is the only table in the FROM clause of the sub-query, but the sub-query is correlated to table2, so we can reference columns from table2 in the sub-query.
    Whenever you have a problem, post CREATE TABLE and INSERT statements for your sample data.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using.
    Edited by: Frank Kulash on Aug 1, 2011 1:58 PM

  • How can I update a customized table from a text document?

    Hi,
    I am one sample file. The file is an text document. From this .txt file how can I update a customized table in SAP.
    How can I Update the fields in the Customized table.
    Thanks & Regards,
    NManohar.

    use the Function module GUI_UPLOAD or WS_UPLOAD and give the path and the file name from where the data has to be uploaded. in table parameter give the iternal table
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and finally use insert command to update the database table with the data

Maybe you are looking for

  • Windows 8 full system backup and restore to new laptop (system with 32GB mSata Cache)?

    Hi, I have a new Envy DV7-7205 which has 2TB storage with 32GB HDD Cache (or mSata, not really sure how it's implemented). I need to return the laptop as it's faulty but I would like to startup on the replacement exactly where I left off. Are there a

  • ADS Error when opening Benefits Confirmation Statement

    Hello, I am on EP7.0 NW04s ECC6.0 and trying to open Benefits Confirmation Statement in ESS and when clicking on it I get the following error with the SAP GUI in the portal saying : ADS : Request Start Time : Tue Oct 09 13:43:00 CDT 2007(200101) and

  • Add arabic subtitles with Premiere cs5

    Hi to all, I need to add arabic subtitles to a video, but I have problems when I copy and paste the text from a PDF file. When I copy each sentence, what it is finally pasted is different, so I do not know what to do. Can someone help me please? Do I

  • How do I convert Element version 9 catalog to Version 11?

    I have installed Photoshop elements version 11 on my windows 7 PC.  It won't convert my catalog on Photoshop Version 9 to version 11.  How can I fix this?

  • Catalog and Catproc

    Hello Everybody I am new to Oracle. I have few queries related to Catalog and Catproc. 1)What happens if we run CATALOG and CATAPROC as non SYS user? 2) Can we run CATPROC first then CATALOG? If not then why? 3) What happens if I rerun CATALOG.SQL &