Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 update same table one a different machine

Author  Topic 

milena
Starting Member

16 Posts

Posted - 2008-08-22 : 06:23:04
Hi all,

I need to do the following thing.I have table A (f1,f2,f3) on machine 1 and table B(f1,f2,f3) on machine 2.Table A and table B are the same tables , however data in them is different as table A was updated recently but not table B.So I am wondering what is the easiest way I can make the two tables have the same data.
Would that be accopmlished with query like insert statement ?
Dynamic SQL ?I have no idea really.
An update statement would not work here I think .
If someone can give help with syntax would really be appreciated.

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-22 : 07:33:33
You can use OPENROWSET for this if its a one off activity. look into booksonline for syntax and usage.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-22 : 09:11:35
Put your insert query (using Left join ) in Export/Import wizard.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-08-22 : 09:15:04
or use a linked server.

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page
   

- Advertisement -