Reputation: 55
I am trying to access a remote function from a SELECT
clause (lets call it view clause).
The problem is I can't use OPENQUERY and do a JOIN because I need to send a value from the view clause to the remote function. OPENQUERY doesn't allow variables.
I can't use EXEC to create a dynamic SQL query because it will not work with my view clause.
I cant't move the remote function to the local server, I can't create new functions in the local server at all.
The whole thing is actually very frustrating, is this even possible to solve?
Example code:
SELECT [col1],[col2],[col3],RemoteServerFunction([col1]) FROM [tbl1] WHERE
[col2] = X
Thanks in advance!
Upvotes: 2
Views: 320
Reputation: 2274
Sorry, But its True.
Here's the official word. You cannot call a UDF in this way.
Upvotes: 1