Inserting data from a database on another server

  • Hello,

    I will soon need to update a table in one MS-SQL database from a table in another MS-SQL database. I know how to do it using an INSERT statement if the 2 databases are on the same server, but these are on different ones. Can this even be done via a SQL string(s) or does it require another method, such as a DTS package or bulk insert?

    Thanks.

  • You can set up a linked server from the instance that will be running the update to the instance that the other table is on. You can then do an update like this:

    update remoteServer.DBname.schema.tableName set blah = blah

    There is info in BOL. Just look up linked server.

  • That looks promising. I'll look into that. Thanks!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply