|
selsect hs_newvalue (case hs_newvalue when hs_newvalue= 'closed' then hs_newvalue=hs_changer
else hs_newvalue)
end
from
(select a.bug_type,a.assigned_to,a.test_area,a.Defect_id,a.severity,a.name,
DATEDIFF(minute,b.hs_change_date,a.hs_change_date) + DATEDIFF(minute,b.hs_change_time,a.hs_change_time)
as dif,a.hs_changer,a.hs_newvalue,a.change_date,a.change_time
from t1 a
left join t1 b on a.rownum = b.rownum + 1
order by a.Defect_id ,a.change_date ,a.change_time )
报错:
服务器: 消息 170,级别 15,状态 1,行 25
第 25 行: 'selsect' 附近有语法错误。 就是颜色标识的地方
服务器: 消息 156,级别 15,状态 1,行 34
在关键字 'order' 附近有语法错误。
请教大神哪里错了?要如何改?case函数第一次用,不是很清楚,弄了好久还是没好 |
|