well if you are logged into a user that has rights to both servers and databases then you can do something like this
INSERT INTO Register.MyDatabase.DBO.Customers
SELECT ....
FROM OtherServer.MyOtherDatabase.DBO.Customers.
.
.
.
SQL server uses a 4 part name for all object
1st is the server name
2nd is the database name
3rd is the owner of the object (most often it is DBO)
4th is the actual object
SQL server also lets you span databases using this 4 part name
If you leave any part out SQL server inserts the default
the defaults are as follows
for Server it is the current server you are loged onto
for the database it is the current database you are logged into
for the owner it is the current account you are logged into but if that owner does not have the object it will use DBO
It would be easier (point-and-click) to use DTS from the Enterprise Manager. Do you want to copy the whole table, or are you trying to synchronize the two tables?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.