2
嗨我有一个以下查询,检查代码以确定它是何时进入或查看。在选择查询中使用多个case语句
declare @timestamp datetime;
select
case @timestamp
when a.updatedDate =1760 then 'Entered on' +a.updatedDate
when a.updatedDate=1710 then 'Viewed on' +a.updatedDate
else 'Last Updated on'+ a.updatedDate
end
from t_mainTable a
where [email protected];
当我尝试运行此查询它给了我错误
Msg 102, Level 15, State 1, Procedure p_xxxx, line 40
Incorrect syntax near '='.
有一些错误了Syntex在时线。请让我知道如何纠正这种 感谢
删除'@ timestamp'。 –