我在此问:
Declare @Type varchar
select
if
(tn.notification_type=1)
begin
set @Type= WORK FLOW
print status + CAST(@type AS nvarchar(58))
end
from tbl_Notification tn
在此,我遇到了一个问题,即列入一个基于表列价值的条件。
E.g. 我有价值1和2及3
当我执行时,我就犯了错误。
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword if .
Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword from .