Question Locked

Sql Select from Databases on Multiple MSSql Servers

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a way to include the server name in an sql select statement. (E.g select ([select columns] from server1.db1.dbo.table1 , server2.db2.dbo.table2 where [where statements])

if not is there any other way to achieve this

2 replies

by tony hopkinson

Been a long time but yiou can then use
select * from Link.dbo.Table

Where link = server.database.

Usually find a lot of waffle under Remote Stored Procedures around this.

This discussion is closed to new replies.