Receiving error “Select statements included within a function cannot return data to a client”

前端 未结 2 641
深忆病人
深忆病人 2021-01-07 23:01

Receiving an error when attempting to use a Select statement in a function. The error states:

Msg 444, Level 16, State 2, Procedure JDE_GetWhereClause

2条回答
  •  一整个雨季
    2021-01-07 23:09

    Found this MSDN article helpful and it resolved my issue:

    RETURN (SELECT GETDATE());
    

    Returning values directly from a select statement, avoiding variable.

提交回复
热议问题