February 2, 2011 at 4:15 am
Hi
I have a view below:
SELECT TOP (100) PERCENT TimeStamp, Field1
FROM
Linked_Server.Database.dbo.MyTable
WHERE (Field1 = 'Blah') AND
(Linked_Server.Database.dbo.MyUDF([Param1], [Param2]) = 1)
When saving the view i get the following error:
'Remote function reference Linked_Server.Database.dbo.MyUDF is not allowed, and the column name Linked_Server could not be found or is ambiguous'
I know it can see the Linked_Server as i'm using it in other views.
Any thoughts?
Thanks
Paul
February 2, 2011 at 5:04 am
This was removed by the editor as SPAM
February 2, 2011 at 5:53 am
Just had a quick look at Openquery thanks.
So is the following the correct syntax for using a UDF from linked server in where clause.
SELECT TOP (100) PERCENT TimeStamp, Field1
FROM
Linked_Server.Database.dbo.MyTable
WHERE (Field1 = 'Blah') AND
(SELECT * FROM OPENQUERY(Linked_Server,'MyUDF([Param1], [Param2])' = 1)
Sorry can't connect to my dev machine at the moment to check syntax.
Thanks again
Paul
February 2, 2011 at 6:11 am
This was removed by the editor as SPAM
February 2, 2011 at 6:40 am
Thanks I'll give that a try.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply