Calling an in-line TVF with named parameters, what is the proper syntax?

后端 未结 1 931
-上瘾入骨i
-上瘾入骨i 2020-12-18 23:55

I tried calling an in-line TVF with positional parameters and it works fine:

SELECT MyTable.Col1,
       (SELECT TvfColumn FROM ufnGetData(MyTable.Col1, MyTab         


        
相关标签:
1条回答
  • 2020-12-19 01:01

    Table-Valued User-Defined Functions can't be treated like a Stored Procedure. You don't use named parameters while calling them, it is position-based. So in other words, what you are trying to do isn't possible.

    Is there a reason why you want to use named parameters? You need to have all parameters defined, so there is no real benefit that you would normally see with stored procedures.

    0 讨论(0)
提交回复
热议问题