Reputation: 665
I have two similar database with the same schema.But one is for printing purpose.
My window form application needs to read data from dby on server1 to dby on server2.The servers are on different network but can communicate. Am trying to use subquery this is
query:
Using main_db
Insert into socio_bio
select * from socio_bio where receiptno in (
)
Upvotes: 0
Views: 71
Reputation: 46
You can use this stored procedure: sp_addlinkedserver()
exec sp_addlinkedserver @server = 'yourServerName'
select * from [server].[database].[schema].[table]
and in your example
select * from [yourServerName].[testdb].[dbo].[table]
Upvotes: 2