Workaround for calling table-valued function remotely in SQL Server has even more issues

前端 未结 2 1674
星月不相逢
星月不相逢 2020-12-31 10:29

I had a query with a set of parameters that needed to be run multiple times with different parameters, so I wrapped it in a table-valued function.

That table valued

2条回答
  •  暖寄归人
    2020-12-31 10:38

    Have you tried this variation - basically you push the call to the function to happen locally on the remote box:

    EXEC REMOTE_SERVER_NAME.db_name..sp_executesql N'SELECT * 
      FROM dbo.MyTableValuedFunctionName();';
    

提交回复
热议问题