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:

  • Import error using Openrowset
  • Why would an Entity Framework model generator not create code for a table when I selected it?
  • C# - Passing parameter to stored procedure and return IEnumerable
  • Results from cursor into view
  • SQL Server 2014 - How to find Distinct records
  • How do install pdo_sqlsrv driver in elastic beanstalk to connect SQL server db instance
  • select
        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.

    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.