T-SQL Script for comparing data in record level

  • Hi ,

    In advance Thanks for any help!

    I have a situtaion to compare data between two tables residing in two different databases. There are two databases (db1 & db2).

    db1 is completely relational with defined business rules. Typical production database.

    db2 is not relational,(I mean no relationship between the tables. All tables are just created individually thru DTS while loading the data from flat files).

    In both the databases data is coming from same source(Flat files) 

    In db1 - we are loading the data thru SSIS. (Data is loaded into multiple tables (db1 is completely relational)

    In db2 - we are loading the data manually thru DTS and we are creating each flat file as one table.

    Task is, we need to compare the data in record level between the tables residing in db1 & db2 databases by T-SQL scripts.

    If anyone has T-SQL script for this scenario, if you can share it or suggest any other advises or methods to accomplish this task will be greatly appreciated.

    Thank you again!

     

  • Check into using Except maybe?  Check books online under Except Operator.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply