I have created a stored procedure that executes 2 select statements against 2 separate linked server databases. The sp works fine when the linked server names are hardcoded directly into the query. However, I receive an error message when I attempt to pass the linked server names to the sp as variables. Message received is: "could not find server 'variable name' in sysservers. Execute sp_addlinkedserver to add the server to syssservers".
Any ideas on how to pass the linked server name into the query (used in the from clause to point to various tables contained within the linked servers).
Thank you,
Michael Martin
Any ideas on how to pass the linked server name into the query (used in the from clause to point to various tables contained within the linked servers).
Thank you,
Michael Martin