I want to make query to multiple servers and the query is run on remote server. So that, I tired that the following code.
--(The @svr_name will change during program runtime.)
DECLARE @svr_name char(20)
SET @svr_name = 'SERVER1'
SELECT * FROM OPENQUERY(@svr_name, 'SELECT * FROM LIBRARY_DB.DBO.MEMBER')
It does not work!
What can I do?