sql 2005
我要检索 tableA中的 id,text,mount
但是当 id = 2 时 显示 ”2楼“
= 3时 显示 ”3楼“
select text, mount, id = case when id = '2' then '2楼'
when id = ‘3’ then ‘3楼’
from tableA
这样写不对啊
------解决思路----------------------
Select b.Road_Name, a.IP, case a.status when 1 then '已连接' when 0 then '已断开' else '异常' end as Status, a.UpdateTime from ClientConnInfo a, Road b where a.IP = b.Road_IP
------解决思路----------------------
别名不能加 a.,真要的话,要用[]括起来