I created a Linked Server from my local Sql Server, as given in
http://sqlserverplanet.com/dba/local-linked-server
However when I try to execute a stored pro
I had the same error trying to query through a linked server. However, I was querying a view on the target server, not a stored procedure.
The target server's view was created like this:
CREATE VIEW vABC AS
SELECT ... FROM Table1
UNION ALL
SELECT ... FROM Table2
To fix the problem, I did an alter view, and wrapped the two UNION statements in a subquery, like this:
CREATE VIEW vABC AS
SELECT * FROM (
SELECT ... FROM Table1
UNION ALL
SELECT ... FROM Table2
) T
Must be some metadata issue with the original view.
Hope this helps you!