Compare two tables that are in XML format (xml diff)

I have two tables in XML-format and need to list differences in
1. Structure and/or
2. Content
SAP offers CL_SXIVERI_XML_COMPARATOR, but this is too simplistic for the requirement.
Any ideas or suggestions will be appreciated. Thank you!

Hi Adrian,
You can convert the data from the XML file to an internal table. Once the data is in the internal table you can easily paly with it
Refer to this Wiki for details: [https://wiki.sdn.sap.com/wiki/display/ABAP/UploadXMLfiletointernal+table].
You can also check Simple Transformations as well.
Cheers,
Suhas

Similar Messages

  • Two columns in the same table that are foreign keys to the same master key

    i want to create a table let say X, which have two columns that are foreign key that reference the same column in the master table, so does this count as bad database design.

    here is the full ddl for the two table, where in the second table there are two columns that represent the primary key and they are also two foreign keys to the same columns in the master table (items)
    Desc item table;
    Item_id
    Item_name
    Item_price
    Item_quantitiy
    Create table item_recommendation ( item_id varchar(20), recommended_item varchar(20),
    CONSTRAINT recom_primary PRIMARY KEY (item_id, recommended_item),
    CONSTRAINT F1 FOREIGN KEY (item_id) REFERENCES items(item_id), ),
    CONSTRAINT F2 FOREIGN KEY (recommended_item) REFERENCES items(item_id));

  • Comparing Two tables with 300k records and update one table

    Could you let me know how to compare two tables having 300k records and update one table.below is the scenario.
    Table Tabl_1 has columns A,B and Tabl_2 has columns B,new_column.
    Column B has same data in both the tables.
    I need to update Tabl_2 in new_column with Tabl_1 A column data by comparing B column in both tables.
    I m trying to do using PLSQL Tables.
    Any suggestion?
    Thanks.

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    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 (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002
    ef2019c7-080c-4475-9cf4-2cf1b1057a41 wrote:
    Could you let me know how to compare two tables having 300k records and update one table.below is the scenario.
    Table Tabl_1 has columns A,B and Tabl_2 has columns B,new_column.
    Column B has same data in both the tables.
    I need to update Tabl_2 in new_column with Tabl_1 A column data by comparing B column in both tables.
    I m trying to do using PLSQL Tables.
    Any suggestion?
    Thanks.
    Why are you trying to use PL/SQL tables?  If tabl_1 and tabl_2 are regular database tables, it will be much simpler and faster just to use them.
    Depending on your requirements, you can do an UPDATE or MERGE, either in SQL or in PL/SQL.

  • How to compare two tables in SSIS?

    I am creating an SSIS package that will compare two tables and then insert data in another table.
    Which tool shall I use for that? I tried to use "Conditional Split" but it looks like it only takes one table as input and not two.
    These are my tables:
    TABLE1
    ID
    Status
    TABLE2
    ID
    Status
    TABLE3
    ID
    STatus
    I want to compare STATUS field in both tables. If Status in TABLE1 is "Pending" and in TABLE2 is "Open" then insert this record in TABLE3.

    You can use MERGE command , Sorry cannot test it right now.
    MERGE INTO tbl3
    USING (SELECT tbl2.ID, tbl2.status,tbl1.status as st1  FROM tbl1 JOIN tbl2 ON tbl1.ID=tbl2.ID) AS t ON T.ID=tbl3.ID 
    AND t.status='OPEN' AND t.st1='pending'
    WHEN NOT MATCHED 
    INSERT (status) VALUES (t.status)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • BUG? BRIDGE statement to compare two tables

    Hello,
    I tried to compare two tables in different dbs and remembered a post about Cross Connectin Queries
    http://barrymcgillin.blogspot.com/2010/11/cross-connection-queries.html
    BRIDGE temparb AS "EB05 01"
    (SELECT * FROM arb)
    (SELECT * FROM temparb
    MINUS
    SELECT * FROM arb
    UNION ALL
    (SELECT * FROM arb
    MINUS
    SELECT * FROM temparb
    );I would expect to get the differences between the table arb in my current schema and the table arb alias temparb in the other db. Yet it seems, that in this case only the table in my current schema is read.
    I materialize the BRIDGE table with
    BRIDGE temparb AS "EB05 01"
    (SELECT * FROM arb)and select the value I know to be only in the remote schema
    SELECT id FROM temparb WHERE id = 2562;
    SELECT id FROM arb WHERE id = 2562;Both times I get no result. I even tried to use aliases on the table, same result. Tested in 3.0 and 3.1 EA3.
    Has anyone tried this before?
    Regards
    Marcus

    Hi Marcus,
    Have you tried it without the double quotes around the connection name?
    I have a connection called
    system_local
    which I run the following command in
    drop table testbridge_remote;
    drop table testdbrige;
    create table testbridge(col1 int);
    insert into testbridge values (1);
    insert into testbridge values (2);
    insert into testbridge values (3);
    commit;
    I have a connection called
    Connection Name With Space
    which I run the following in
    drop table testdbrige;
    create table testbridge(col1 int);
    insert into testbridge values (4);
    insert into testbridge values (5);
    insert into testbridge values (3);
    commit;
    Then in the system_local connection/worksheet I can run the following statement
    BRIDGE testbridge_remote as Connection Name With Space(select * from testbridge)
    +(SELECT * FROM testbridge_remote+
    MINUS
    SELECT * FROM testbridge
    +)+
    UNION ALL
    +(SELECT * FROM testbridge+
    MINUS
    SELECT * FROM testbridge_remote
    +);+
    It works ok.
    Returning rows in the remote table not in the local table , and rows in the local table not in the remote table .
    Regards,
    Dermot
    SQL Developer Team.

  • Compare two table columns

    hi all,
    i am using db10g.
    my task is to compare two table's data for example
    table1 is having
    col1 col2 col3
    a b c
    e f g
    table2 is
    col4 col5 col6
    a e c
    e f g
    so i have to compare col1 first record and col4 first record.
    in otherwords first table first column first item with second table first table first value and so on.
    for ex: a= a
    b= e
    c= c etc
    how can i acheive this?
    both are database tables.
    i cannot use minus function because data types are different for the corresponding column
    how can i compare it?
    Thanks..
    Edited by: user13329002 on Jan 13, 2011 1:09 AM

    Hi,
    Try this
    select
        case
            when a.col1 = b.col1 then 'EQUAL' else 'NOT EQUAL' end column1,
        case
            when a.col2 = b.col2 then 'EQUAL' else 'NOT EQUAL' end column2,
        case
            when a.col3 = b.col3 then 'EQUAL' else 'NOT EQUAL' end column3 
    from (select col1,col2,col3,rownum rn from table1) a,
                                (select col1,col2,col3,rownum rn from table2) b where a.rn = b.rn Try to see how you order the rows of the two tables.
    cheers
    VT

  • Comparing two tables

    how to compare two tables between two systems ?

    hi sravan, u can go to t/c OY19 to compare the two tables.
    Choose Manual selection
    Enter the name of the table that you want to compare
    Choose Execute
    in the next screen you have to give the description and RFC connection name which will make the link between two clients.
    Regards...
    Arun.
    Reward points if useful.

  • How do i stop two processes that are running in activity monitor

    how do i stop two processes that are running in Activity Monitor took one out of trash and it says preparing to move desktop still running with another one been running for hrs now want to stop these many thanks jen.

    Select each one and Force Quit it.
    But be careful there are many processes that are run by the OS that if quit will cause problems possibly even crash the system.
    regards

  • TS1292 There are two numbers that are not visible in the middle of the code What can I do?

    There are two digits that are not visible in the middle of the itune code. How can I still access this card?

    Click here and request assistance, supplying as much of the code as you can.
    (74408)

  • Cannot compile two classes that are on same package

    When I compile two classes that are on same package one class that is independent of other class gets compiled but the other class which uses
    the first one shows cannot find symbol error with the first class name

    try...
    javac *.java
    that should compile all the java files in that folder at the same time. I dont know if that will fix your problem but it is worth a shot.

  • Compare two tables and log the difference

    Hi,
    I want to compare two tables and log the difference in new table with the fields as (old value,new value, column name). The column name should be the changes value column

    Can you show an example?
    SELECT Foo.*, Bar.*
       FROM Foo
            FULL OUTER JOIN
            Bar
            ON Foo.c1 = Bar.c1
               AND Foo.c2 = Bar.c2
               AND Foo.cn = Bar.cn
     WHERE Foo.key IS NULL 
        OR Bar.key IS NULL; 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Re : The Tables that are linked in SAP R3 Datasource

    Can any one mention what are the tables that are link to the sap data sources
    For Eg : 2LIS_11_VAHDR for the given data source what are the tables that are linked , where exactly the theses tables are stored in the database

    Hi,
    You can get this information from SAP documentation.Please check the below link.
    http://help.sap.com/search/highlightContent.jsp
    Regards,
    Raju

  • Is there a way to find the temporary table that are created or read during?

    Hi All,
    I'm working on performance optimization where I have to find the temporary tablespaces that are created or read during runtime? Is there any way to find it?
    Can you please also tell me how the temporary tables are created? And after each run time whether the data is getting deleted or the whole table is getting deleted?
    Whether these tables are created only during runtime? What are the naming conventions for all the temporary tables that are created?
    Is the table creation has anything to do with Delta or Full load?
    Regards,
    Kartik

    Stephen Tyler Bloom wrote:
    When they come out with the next garageband, they should add that feature .
    be sure to let Apple know:
    http://www.bulletsandbones.com/GB/GBFAQ.html#sendfeedback
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How to know the List of Tables that are updated through a ABAP Program

    Hi,
    Is there a program or something that will help me to identify the List of Tables that are used in a ABAP program(ABAP Report, Transaction .... program) without debugging it or looking at the dictionary structure.
    I really need this urgently. Try to give me many methods as possible.
    Thkx
    Kishan

    Hi,
    I created a Z-transaction for my SE49 and debugged a little bit - it's not so fantastic any longer - just like the proposal of SE80 - DDIC list.
    SE49 (and I guess similiar functions, too) just scan the source code for a list of key words: tables, select, update, insert, modify, export, import.
    But very (very!) often updates are encapsulated into function modules - and here this technical cross reference (just like SE80 DDIC list) is of no help.
    So a SQL trace (or runtime analysis) is still the best option to get a complete list. Still these tools just analysis one process - if in other circumstances more tables are involved, can't be judged.
    E.g.:
    - creating one new entry: 1 table
    - changing existing entry: 2 accesses to 1 table + log table
    Regards,
    Christian

  • I have two computers that are not working

    i have two computers that are not working with 1 year warranty

    If offering for sale I will give five dollars for the pair. Barring they are not for sale and each have one year of warranty my suggestion is to contact HP Support by telephone about sending the computers to a repair facility.

Maybe you are looking for