标签:sp bs as sql nbsp c ca rom server
--select DataName ,
--case Code
--
-- when ‘W01‘ then ‘男‘
--
-- when ‘W07‘ then ‘女‘
--
-- else ‘其他‘
--
-- end as Code
--from dbo.HistoryData
select DataName,
(
case
when Code=‘W01‘ then ‘男‘
when Code=‘W07‘ then ‘女‘
else ‘其他‘
end
)
from HistoryData
sql server 中的case when then 语句
标签:sp bs as sql nbsp c ca rom server
原文地址:http://blog.csdn.net/syytem004/article/details/40918271