T-SQL: Cannot pass concatenated string as argument to stored procedure

后端 未结 3 2097
梦如初夏
梦如初夏 2020-12-09 09:38

Scenario: Need to pass n arguments to a stored procedure. One of the arguments is of type varchar(x). That varchar argument needs to b

3条回答
  •  盖世英雄少女心
    2020-12-09 10:04

    You cannot do something like this either

    exec SomeProc getdate()
    

    you have to put all that stuff in a param like you are doing at your bottom query It might be because it is non deterministic (at least for functions)

提交回复
热议问题