So I have this user-defined table type parameter, which is used in my scalar function and might be empty.
I've read this topic about passing empty list to table-valued parameter on a stored procedure:
Binding empty list or null value to table valued parameter on a stored procedure (.net)
And basically, as one of the repliers said:
"The trick is: don’t pass in the parameter at all. The default value for a table-valued parameter is an empty table"
However, when I try this on scalar function, I get an error:
An insufficient number of arguments were supplied for the procedure or function
So how do I pass empty value to table-valued parameter on a scalar function?