I have a dynamic sql statement that runs on a remote linked server. I can run the statement like this
exec (@sql) at MylinkedServer
The data comes back ok, but that's where the issue starts. I can't seem to do anything locally with the result set. I can't insert it into a local table or a temp table.
Eg:
insert into #results exec(@sql) at DC105WCSV712
Can some one show me how this could be achieved ?