• rvkhadava (6/5/2009)


    I have two tables, stg,main with the same structure.Each day data is refeshed into stg from the flat file. And from there into main.Before the main table is loaded,I need to validate if the data in all the columns of the row is matching.The main challenge is I have 100 columns in these tables. Can any one recommend me of a optimal solution to compare data across the tables ?The bottom line is I should not create duplicate rows into the main table.

    Thanks in Advance.

    Hi,

    I have implemented the same task using SSIS and it works like a charm. I have used lookup table task in SSIS.

    http://www.sqlis.com/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx ===> use method 2, it works for me.

    Hope this helps,

    \\K

    [http://sqlquest.blogspot.com/]

    ______________________________________________________________________________________________________________________________________________________________________________________
    HTH !
    Kin
    MCTS : 2005, 2008
    Active SQL Server Community Contributor 🙂