Friday, February 10, 2012

Calling UDF over Server Link

For some reason, over a server link, the following call to a UDF on a linked server does not work, it seems it is treating the UDF as a table.

The same UDF called on the local server works fine.

--call/select from function
SELECT
MASTERID
FROM
PAUL.RISK_DB.dbo.FNTRADEFILEPRICE('10/2/2006')

error:
Server: Msg 170, Level 15, State 31, Line 5
Line 5: Incorrect syntax near '('.

Thanks.I created a sproc that calls the function, works like a charm. Still does not expain why calling the function natively from a remote server does not work, this is a work-around though.

Thanks,
Schmed.

No comments:

Post a Comment