0

I have a remote server and on remote server have a SQL server database. I want write this t-sql, for example:

INSERT INTO mylocaldatabase
FROM
    remoteserver
WHERE
    remoterserver.id > 100

How can I solve this?

thanks for you.

Yannick Meeus
  • 5,643
  • 1
  • 35
  • 34
behzad razzaqi
  • 93
  • 2
  • 10
  • 1
    possible duplicate of [Selecting data from two different servers in SQL Server](http://stackoverflow.com/questions/1144051/selecting-data-from-two-different-servers-in-sql-server) – Raging Bull Mar 03 '15 at 08:39
  • You should use linked server. See [**this answer**](http://stackoverflow.com/questions/1144051/selecting-data-from-two-different-servers-in-sql-server/22342227#22342227). – Raging Bull Mar 03 '15 at 08:41
  • If linking servers is not an option, you will need to investigate bcp to export and import data between the servers. You do realise your example is talking about TABLES, not SERVERS right? – Mike Mar 03 '15 at 09:52
  • @RagingBull thanks you my friend to pay attention my problem.its work. – behzad razzaqi Mar 03 '15 at 10:29

0 Answers0