1. 程式人生 > >遠程訪問Function時報錯Remote table-valued function calls are not allowed.

遠程訪問Function時報錯Remote table-valued function calls are not allowed.

dbo 訪問 遠程 his 解決 all 原因 rem tab

開始是這樣調用的:
select * from [LinkedServer].[db name].dbo.[function name](param1, param2)

原因:

Only table-valued functions can be used in the FROM clause.

解決辦法:

If it‘s a scalar function, use this:

SELECT  * FROM    OPENQUERY(LinkedServer, ‘SELECT [db name].dbo.[function name](param1, param2)‘)
 

遠程訪問Function時報錯Remote table-valued function calls are not allowed.