SQL Server table-valued function parameters

Discussion created by pier-olivier.tremblay Champion on Jan 25, 2017
Latest reply on Jan 27, 2017 by pier-olivier.tremblay

Hi team,


Is anyone aware of how we should pass parameters to SQL server table-valued functions?


When doing a select, you can use "inline statement" with some "?" and provide the value for each parameters.



This inline statement, with a parameters, works perfectly fine.


When i try to do the same with a SQL function, PAM says : The value is not set for the parameter number 1.


what i'm trying is :


Select * from [table-valued_Function] (?,?,?,?)

And send the parameters as follow :




Coding the value in the inline statement works perfectly. (Select * from [table-valued_Function] ( 'test','test','test','test')


Each variable i used as a parameter have a value.


My function works well in SQL using the exact same syntax ( Select * from [table-valued_Function] (?,?,?,?) )