Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error calling remote scalar-valued function

I am making a call from a sql 2005 database to a sql 2000 scalar-valued function and recieve the following error message:

Remote table-valued function calls are not allowed.

here is my call:

select * from [server/instance].[db name].dbo.[function name](param1, param2)

not sure why it says table-valued function, but that's the error message it get. Does anyone know of a way around this?

thanks in advance, Billy

like image 825
Billy Logan Avatar asked Oct 26 '09 18:10

Billy Logan


1 Answers

Only table-valued functions can be used in the FROM clause.

If it's a scalar function, use this:

SELECT  *
FROM    OPENQUERY(SERVER, 'SELECT [db name].dbo.[function name](param1, param2)')
like image 192
Quassnoi Avatar answered Sep 21 '22 17:09

Quassnoi