Compare two tables with same data

  • Hello,

    Can some one provide information on how we can compare two tables using a JOIN or other techniques to figure out if they are sync'd together. For example, Table A and Table B should have the same data but Table B get's out dated. How would I go about figuring out what records Table B does "not" have which Table A does.

    Column mapping: A.Column_a = B.Column_b

    Thanks,

    S

    --
    :hehe:

  • There are many tools available like SQL Compare, if you dont have one, you can use Microsoft's TableDiff utility.

    see Here



    Pradeep Singh

  • Also take a look at the Except function in SQL 2005. That one can make finding table differences quite easy.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Pradeep,

    Thanks for the article. However, I wouldnt be able to do this within a stored procedure or would I ?

    -

    S

    --
    :hehe:

  • Nice, it works like a left join but very simple. Thanks... I'm still looking to see if this solves my problem

    --
    :hehe:

Viewing 5 posts - 1 through 4 (of 4 total)

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