How do you remotely execute a table valued function in Sql-Server 2000/5?

I have a stored procedure (sql2005) that needs to call a table valued function on a remote server (sql2000).

My query is as follows:

  • Upgrading SQL Server 6.5
  • How to find who deleted a view from DB with SIMPLE recovery model
  • Create an index on SQL view with UNION operators? Will it really improve performance?
  • TimeStamp in sql
  • Error when trying to insert date into datetime column
  • Cannot get rid of “physical connection is not usable” exception
  • select
        *
    from
        mytable mt
         cross apply 
          opendatasource('sqloledb','Data Source=remoteserver;UID=user;Password=pass').mydatabase.dbo.mytvf
          (cast(param1 as numeric(20,0)), @param2, mt.param3) 
    

    I’m getting an incorrect syntax error near ‘cast’. Is it possible to execute a tvf with this notation? Should I somehow be using openrowset? Any help is appreciated.

    One Solution collect form web for “How do you remotely execute a table valued function in Sql-Server 2000/5?”

    Here’s the official word. You cannot call a UDF in this way.

    http://connect.microsoft.com/SQLServer/feedback/details/276758/remote-table-valued-function-calls-are-not-allowed

    Looks like Mircosoft is working on the ability in a future version though.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.