How to compare the contents of two different tables

hello. can somebody give me an idean on how to compare the contents of two different tables in mysql?
example, i have a table named Main List and a table named New List.
The contents of the New List should be compared to the contents of the
Main List, to check if they are equal. I don't have any idea how to manipulate
this data. Hoping for your help. Thanks.

it is better to comapre it using java.. try get the resultset first and store that in collections then comapre the two collections

Similar Messages

  • How to compare the programs in two different systems

    Hi,
    I have two systems say A & B and i have the program say 'Z_TESTPROG'.
    How to compare the program in two different systems.
    Regards,
    Venkat

    Hi,
    Check the version in Utilities -> version -> version management in both servers is one option.
    Another one is using SE39 transaction.
    Regards
    Manasa

  • How to compare the contents of two XML documents

    Hi all,
    I was trying to compare the contents of two xml documents, they are both validate for the same XML Schema. i was using the xmlunit to do this. but some how it doesn't work like what i have expected. for example:
    1.xml : <test><item>2</item><item>1</item></test>
    2.xml: <test><item>3</item><item>2</item><item>1</item></test>
    the result from XMLUnit is this two xmls are different, but it compares <item>2</item> with <item>3</item>, which i cannot find out where the real diiffs are.
    does anybody know how i can do this correct?
    best regards,
    tina

    I faced a similar problem in one of my projects and hence wrote my own comparator. Most comparators like ExamXML etc show XML as different if the nodes under a parent node occur in different seqeunce or a set of repeated nodes occur in different sequence. The comparator that I wrote gives you the flexibility to configure how to identify a node from a set of repeated nodes and is able to compare them successfully if they occur in any order. You can view the sample output at http://geocities.com/dheerendra_itbhu/TipsFromDheeru.html
    and contact me in case you need the source code.

  • How to fill the data of two different tables into one?

    Hi Experts,
    I have two tables named CDHDR and CDSHW(structure). I have extracted the  data from these two tables through two function modules named CHANGEDDOCUMENT_HEADER and CHANGEDOCUMENT_POSITION. Now I have the data in to different tables.
    These two tables neither has relationship with each other through any field nor have any field which exist in both. Can anyone tell me in this case what should be the process to take the data of both the tables into one table. How can I match the record of one table to another?
    thanks a ton in advance.
    Edited by: Moni Bindal on Apr 28, 2008 4:16 PM
    Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:42 PM

    Hye Bindal,
      without a relation, it is not possible to club the data of 2 internal tables. More over it depends on the requirement as to y u should club to non related quantities in an internal table.
    if you wish to do so, one thing is it has internal table which includes the strucute of the 2.
    data: begin of ty_out,
              first type first_structure,
              second type second_structure,
             end of ty_out.
    data: itab type standard table of ty_out.
    data: wa type ty_out.
    loop into it1 into wa1.
    move corresponding wa to wa1.
    append wa to itab.
    endloop.
    loop into it2 into wa2.
    move corresponding wa to wa2.
    append wa to itab.
    endloop.
    now the internal table itab will have all the contents of it1 and it2.
    <REMOVED BY MODERATOR>
    Thanks,
    Imran.
    Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:43 PM

  • How to compare the data of two identical tables

    My requirement is to compare two identical tables(eg., t1 and t2) and display the column, which value got changed, old value and its new value.
    For eg:
    T1:
    StudId C1 C2 C3
    1 40 50 90
    2 30 80 100
    3 20 10 11
    T2:
    StudId C1 C2 C3
    1 100 60 90
    2 30 90 100
    3 20 60 80
    output should be:
    StudId Column prevvalue changedvalue
    1 C1 40 100
    1 C2 50 60
    2 C2 80 90
    3 C2 10 60
    3 C3 11 80
    Please help me to how to achieve using oracle pl/sql. It is bit urgent

    No need of PL/SQL, you can do it in SQL as shown
    SQL> create table t1
      2  (
      3  studentId number,
      4  c1 number,
      5  c2 number,
      6  c3 number
      7  );
    Table created
    SQL> insert into t1 values (1,40,50,90);
    1 row inserted
    SQL> insert into t1 values (2,30,80,100);
    1 row inserted
    SQL> insert into t1 values (3,20,10,11);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> create table t2
      2  (
      3  studentId number,
      4  c1 number,
      5  c2 number,
      6  c3 number
      7  );
    Table created
    SQL> insert into t2 values (1,100,60,90);
    1 row inserted
    SQL> insert into t2 values (2,30,90,100);
    1 row inserted
    SQL> insert into t2 values (3,20,60,80);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select * from t1;
    STUDENTID         C1         C2         C3
             1         40         50         90
             2         30         80        100
             3         20         10         11
    SQL> select * from t2;
    STUDENTID         C1         C2         C3
             1        100         60         90
             2         30         90        100
             3         20         60         80
    SQL> select
      2  t1.studentId StudId,'c1' ColumnName,t1.c1 prevvalue,t2.c1 changedvalue
      3  from t1,t2
      4  where t1.studentId = t2.studentId and
      5  t1.c1 <> t2.c1
      6  union
      7  select
      8  t1.studentId,'c2',t1.c2,t2.c2
      9  from t1,t2
    10  where t1.studentId = t2.studentId and
    11  t1.c2 <> t2.c2
    12  union
    13  select
    14  t1.studentId,'c3',t1.c3,t2.c3
    15  from t1,t2
    16  where t1.studentId = t2.studentId and
    17  t1.c3 <> t2.c3
    18  ;
        STUDID COLUMNNAME  PREVVALUE CHANGEDVALUE
             1 c1                 40          100
             1 c2                 50           60
             2 c2                 80           90
             3 c2                 10           60
             3 c3                 11           80
    SQL>

  • How can i compare the contents of two folders ?

    how can i compare the contents of two folders and find out which files are in one but not in the other?? Knowing how to do this would be the best thing ever, especially when dealing with a large number of files. Often, for instance, I'm dealing with a large number of images, processing them, and saving the retouched ones to a new folder, and need to check that they are all there. If there are say three files missing in the second folder (out of say a hundred in total) being able to automate the process of elimination would be very useful. Please help!!!
    B

    I really wish I knew the answer to this. I work between two macs, a G5 and MacBook Pro when I'm on the go. Each time I move from one to the other I have to copy all my files to the computer I'm going to work on, so I end up with the same files being duplicated. It's not a problem if it's not much data but in my case the it can be to 30GB, mostly graphics files, photoshop, motion, final cut pro, etc.
    There's has got to be a way automator can make a comparison between two folders to sort out what's changed and what's remained the same. It would be nice also if this feature could be done globally on the hard disk using spotlight's technology to stop files being duplicated in places you didn't even know about and taking up valuable disk space. I'm not sure how this could be done.
    Any bright ideas Apple?

  • How can I combine post to two different tables with one form?

    I am trying to create a "phantom" record in a table to be used later in a report. How can I create a form and properly $_POST to two different tables? Thanks for any suggestions!

    In POST processing, just do the insert to one table, followed by the insert to the second table. I don't understand where you are getting stuck.
    Sometimes when we do an insert, we need the auto-generated ID from the newly created record as a "foreign key" for the record created in the second insert. MySQL has a nifty solution for that. The specific code depends on whether you are using the mysql, mysqli or PDO database connection.

  • Comparing row values in two different tables

    Hello,
    Does anyone know if it is possible to compare (and possibly highlight - which I know can be done) row values in two different tables?
    I have a ZIP Code column in table A that I want to compare to a ZIP Code column in table B and highlight those ZIP Codes that are present in table B but not in table A etc. Is this possible?
    Thanks,
    Kenneth

    To be able to apply conditional formatting, I must edit the formulas this way.
    =IF(ISBLANK(B)," ",IF(ISERROR(VLOOKUP(B,Tableau 2 :: B,1,0))," ",VLOOKUP(B,Tableau 2 :: B,1,0)))
    =IF(ISBLANK(B)," ",IF(ISERROR(VLOOKUP(B,Tableau 1 :: B,1,0))," ",VLOOKUP(B,Tableau 1 :: B,1,0)))
    I replaces the four empty strings by strings containing one space character.
    In the field supposed to contain the text which is not contained I just entered a single space character.
    Yvan KOENIG (from FRANCE vendredi 12 septembre 2008 20:52:11)

  • How to pass the contents of an internal table to the IDoc FIDCC2?

    Hi,
    I have an internal table. Using its contents, I have to create an Idoc and do GL posting.
    I have to use FIDCC2 Idoc and the function module IDOC_INPUT_FIDCC2.
    Can u please let me know how to pass the contents of the internal table into the idoc FIDCC2 and do the GL posting?
    Regards,
    Balaji. R

    Hi balaji,
    use function IDOC_INBOUND_FROM_FILE. This will do half the process.
    Documentation is missing, but program RSEINB00 explains something,
    also some links
    [http://help.sap.com/saphelp_nw70/helpdata/EN/dc/6b7f1543d711d1893e0000e8323c4f/frameset.htm]
    [RSEINB00 does not work in background]
    [RSEINB00 flat file to idoc uploading in XI]
    [Loading flat idoc via report RSEINB00 into integration server fails]
    Hope it helps.
    Regards,
    Clemens

  • How to drop the contents on an internal table?

    Dear all,
    can some one suggest me the code to drop the content of an internal table.
    VJ

    Following are the different ways of DELETIONS from ITAB, DTAB and FILE:
    DELETE FROM dbtab       WHERE cond.
    DELETE FROM (dbtabname) WHERE cond.
    - DELETE dbtab.
    DELETE *dbtab.
    DELETE (dbtabname) ... .
    - DELETE dbtab       FROM TABLE itab.
    DELETE (dbtabname) FROM TABLE itab.
    - DELETE dbtab  VERSION vers.
    DELETE *dbtab VERSION vers.
    Delete from an internal table
    - DELETE itab.
    - DELETE itab INDEX idx.
    - DELETE itab FROM idx1 TO idx2.
    - DELETE itab WHERE cond.
    - DELETE ADJACENT DUPLICATES FROM itab.
    Delete a program
    - DELETE REPORT prog.
    Delete text elements
    - DELETE TEXTPOOL prog LANGUAGE lg.
    Delete a data cluster from a database table
    - DELETE FROM DATABASE dbtab(ar) ...ID key.
    Delete a data cluster from the cross-transaction application buffer
    - DELETE FROM SHARED BUFFER dbtab(ar) ...ID key.
    Delete a file
    - DELETE DATASET dsn.
    Delete a screen
    - DELETE DYNPRO f.
    Thanks,
    Santosh

  • How to Compare pdf contents of two pdfs?

    Hi,
    Can anyone guide me how can i do content comparision of pdf at run time. I am able to compare documets using acrobat and get the results. But I have a scenario where i need to compare two documents at runtime.
    Can assembler compare two documents and Highlight the contents? or
    Is there any JavaScript API which can perform pdf content comparision?
    Please help me on this?
    Regards
    Sunil

    Currently I am having xfa pdfs and i will be able to transform to any version (static,pdf etc) to get the comparision result.

  • How to merge the contents of two Photo Booths?

    Hello.  We have two Macbooks (Old + Existing).  Both are/were updated to Maverick.  However, I have restored the Old Macbook back to original (Snow Leopard) in order to sell.  I manually took off files as well as doing a Time Machine backup. 
    I would like to add all the photos and videos from Photo Booth on the Old Macbook into my Existing Macbook.
    Is this possible either a. through a specific file in Time Machine (I do NOT wish to replace the Existing with the Old.  This is a merger.) or b. with the Photo Booth library I copied onto an external harddrive?  However, this is one 1.75gb file with the Photo Booth icon (a film strip) rather than separate photo files.  I am unsure how to access individual photographs or videos.  I was hesitant to open it up in case it negatively affected the Existing Photo Booth.
    Thanks for any assistance.

    Great, I just lost 10 GB of data thanks to OSX folder merge... because appaerantly I should have known better not to keep a subfolder inside my folder I was trying to merge
    I can not beleive more people don't have a problem with this. Merge contents in Lion does NOT merge contents if 1 or more of those supposed "contents" is a subfolder
    Merge contents of two folders only works for files, it does NOT work for subfolders!!!!
    Can we please get this acknowledged as a bug that needs fixing?
    EXAMPLE:
    Drive1 / Folder1
                   - text1.txt
                   - text2.txt
                   - / subfolder / text3.text
    MERGE TO
    Drive2 / Folder1
                   - text1.txt  (this gets updated / merged)
                   - text2.txt  (this gets updated / merged)
                   - / subfolder /
                             - text.txt
                             - text2.txt     (this should get text3.txt merged into it, from Drive1, but instead this subfolder is REPLACED, and NOT MERGED!!)
    Why would i want to replace a folder if I'm trying to merge it!?
    Almost 2013 and OSX still cant merge a folder? unbelievable

  • How to Merge the Contents of Two Folders in Lion, Keeping the Newer Versions of Duplicate Files.

    Select and copy all the contents of the folder containing the newer files.  Paste the files ONTO the folder containing the older files.  The unique files will be copied into the older folder without further ado.  For the duplicates, a window will appear warning that a file with the same name already exists in the older folder.  Check the "Apply to All" box and click on the Replace button, not the Skip button.  These steps will merge all the files in the newer folder into the older folder, replacing the duplicates with the copies from the newer folder.
    Unfortunately, the only information that the warning window provides about the duplicates is their common name, not sizes, dates, or times.  These steps worked for me because I knew for certain that all the newer files were in one folder.

    Great, I just lost 10 GB of data thanks to OSX folder merge... because appaerantly I should have known better not to keep a subfolder inside my folder I was trying to merge
    I can not beleive more people don't have a problem with this. Merge contents in Lion does NOT merge contents if 1 or more of those supposed "contents" is a subfolder
    Merge contents of two folders only works for files, it does NOT work for subfolders!!!!
    Can we please get this acknowledged as a bug that needs fixing?
    EXAMPLE:
    Drive1 / Folder1
                   - text1.txt
                   - text2.txt
                   - / subfolder / text3.text
    MERGE TO
    Drive2 / Folder1
                   - text1.txt  (this gets updated / merged)
                   - text2.txt  (this gets updated / merged)
                   - / subfolder /
                             - text.txt
                             - text2.txt     (this should get text3.txt merged into it, from Drive1, but instead this subfolder is REPLACED, and NOT MERGED!!)
    Why would i want to replace a folder if I'm trying to merge it!?
    Almost 2013 and OSX still cant merge a folder? unbelievable

  • How to compare pixel values of two different grayscale images...

    I have two different grayscale images both of much different sizes. One is 46x20 pixels and the other is 2592x1944 pixels. I'm having trouble finding a way to "scan" the smaller image through the larger one so that comparisons between the pixel values can be made. Basically I'm trying to see if anything matches the smaller image in the big image semi-closely. I can access the pixel values of each image but I can't figure out an algorithm to perform the scan. Any help at all would be very much appreciated! Thanks.

    Hi
    recipe:
    1.
    Find all the values for all the pixels in the small image. Some might be similar. Put all those values that are useful into a List called comparisonList.
    2.
    For each scanline in the large image
    For each pixel in the scanline
    is this pixel the same value as a pixel in the comparisonList?
    if so do something
    is the scanline finished?
    if not next pixel
    loop to next scanline
    where scanline is a horizontal line in the big picture.
    my 2c
    hope helps

  • Comparing the contents of two files

    I have two ASCII files.
    The files contain data from two identical tables in "|" delimited form.
    I need to compare the two files and determine if there is any difference between the two files.
    Any inputs will be appreciated.
    Thank you.
    Ramesh

    In Windows I've found a piece of shareware called WinMerge to be very useful. Try using Google to find it.
    Cheers, APC

Maybe you are looking for

  • User in blackberry manager more than once

    I have a user that has two blackberries and would like to receive email to both of these from the same email account,  Can I do this? will blackberry manager let me have the same user twice? Thanks for the responses

  • External Tables on Windows

    I have Oracle loaded on a Unix server. I am trying to execute stored procedures using External Tables. My external table directories reside on a Windows OS. While I was successful in creating the external tables and the logical directories mapped to

  • C_TADM51_70 certification pass.

    Hi, I have got the certification scheduled in June,2011.For the C_TADM51_70 certification, what is the  qualifying  marks to pass the exam? has anyone recently attempted the exam and would like to provide on this query. I already read the details on

  • Role assignment request

    hi guys, In my scenario, roles are given to end users by their manager. The thing that I'm really confused of, is that the manager should only see users that are part of his team in order to assign them roles.      I saw it's possible to set up restr

  • How to edit(add,delete) vertex at line,polyline,polygon annotation?

    Are any tools or code to edit polylines in adobe reader/acrobat? Now I can only move or edit existing vertexes of the object with the standard tools. But I need to have a simple, but full editor of vector objects. Is it possible?