November 2, 2009 at 2:17 am
Hi All
I need a code to write data into another table if the data has changed from the source then update the destinaion
Thanks
It's better to fail while trying, rather than fail without trying!!!
November 2, 2009 at 2:27 am
An update trigger will do it nicely.
November 2, 2009 at 2:29 am
how about this?
update distination
set [Column] = c.col
from (
select case when a.[Column] <> b.[Column] then a.Colum else b.[Column] end as col
from source a join destination b
on a.id=b.id) as c
November 3, 2009 at 12:08 pm
smthembu (11/2/2009)
Hi AllI need a code to write data into another table if the data has changed from the source then update the destinaion
Thanks
How about SSIS to achieve this.
e.g. compare two tables, and extract the data changed into a staging table and then dump that data into base table.
Hope this helps !
\\K
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
November 3, 2009 at 10:55 pm
Thanks for suggestions, i've used a script sent by hoosen.;-)
It's better to fail while trying, rather than fail without trying!!!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply