Sunday, March 11, 2012

Compare records between two tables

Hi all,
I have table A and populate table B with table A but before I do that I
need to compare records in between those two tables...
If there are new records on table A, I need to insert it into
newTable and if there are records that has changed then I need to insert
into updateTable.
How do i compare two tables row by row if price or description field
has changed.?
Thanks
See if the examples from this page help:
SQL Server DTS best practices
http://vyaskn.tripod.com/sql_server_..._practices.htm
This is a longish article, but to jump straight to the topic, search for the
keyword DDQ on this page
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Kiran B." <kbyajankar@.yahoo.com> wrote in message
news:uCyilibmEHA.3428@.TK2MSFTNGP14.phx.gbl...
> Hi all,
> I have table A and populate table B with table A but before I do that
I
> need to compare records in between those two tables...
> If there are new records on table A, I need to insert it into
> newTable and if there are records that has changed then I need to insert
> into updateTable.
> How do i compare two tables row by row if price or description
field
> has changed.?
> Thanks
>
>

No comments:

Post a Comment