Article ID: 319138 - View products that this article applies to.
This article was previously published under Q319138
If you try to invoke a user-defined function (UDF) through a linked server by using a "four-part naming" convention, you may receive the following error message:
Server: Msg 170, Level 15, State 31, Line 1 Line 2: Incorrect syntax near '('.
User-defined function calls inside a four-part linked server query are not supported in SQL Server 2000. Error message 170 indicates that the syntax of a Transact-SQL statement is incorrect.
To work around this problem, use the Openquery function instead of the four-part naming convention. For example, instead of the following query
run a query with the Openquery function:
If the user-defined function takes variable or scalar parameters, you can use the sp_executesql stored procedure to avoid this behavior. For example:
REFERENCESSQL Server 2000 Books Online; topic: "Openquery"