Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    33

    Question Unanswered: Checksum for a table

    I need to check if two tables on different databases contains the same data.
    I wish to calculate a checksum at table level and if they are different calculate it at row level in order to locate the differences.
    Anyone knows if there is a DB2 function to accomplish this task?

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    there is a tool asntdiff which is part of DB2 II(or Websphere II, whatever they call it now) ... This can be used to comapre the data in two tables ..

    You can also use EXCEPT operation ... create a nickname from the remote table, call it remote_tab and if local_tab is the table you want to compare withj

    select col1,col2 from local_tab
    except
    select col3,col4 from remote_tab

    This will list alll rows in local_tab not in remote_tab ...
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    33
    I've seen on the documentation for the asntdiff command syntax, but are you sure that this will work without the support tables (Q or SQL Replication)?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •