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.
| Author |
Topic |
|
Mikehjun
Starting Member
24 Posts |
Posted - 2010-08-17 : 15:39:06
|
| There are two tables and I just want to insert new rows added in one table to another one. I can easily write t-sql when it is in same SQL database in same server however I don't know how to insert record from sql table in one server to sql table in another server.please help.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++use GISset identity_insert GIS.dbo.xCustomer2 oninsert into GIS.dbo.xCustomer2 (CustomerID, CompanyName, FirstName, LastName, ModifiedDate)(select *from GIS.dbo.xCustomer4where GIS.dbo.xCustomer4.CustomerID not in (select GIS.dbo.xCustomer2.CustomerID from gis.dbo.xCustomer2)) |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-08-17 : 15:40:16
|
| You need to create a linked server.See thishttp://msdn.microsoft.com/en-us/library/aa213778(SQL.80).aspx |
 |
|
|
Mikehjun
Starting Member
24 Posts |
Posted - 2010-08-17 : 17:34:13
|
| Could you help me for the syntax?server2 name:201.11.111.222 (no DNS setup)database name: GIStable name: customer2user id: GISpassword: password |
 |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-08-18 : 07:04:06
|
| EXEC sp_addlinkedserver @server = '201.11.111.222', @srvproduct = 'SQL Server'Vaibhav TTo walk FAST walk ALONE To walk FAR walk TOGETHER |
 |
|
|
|
|
|