sql中 查询判断字段 case when then end
今天又学到一个新东西:
case when then end
select EmployeeID, '<img src=../images/contact/contact_02.jpg>'+EmployeeName + '(' + case when DialogCount=0 then '空闲' when DialogCount > 0 and DialogCount <= 3 then '普通' when DialogCount > 3 then '繁忙' end + ')' as aEmployeeName from TI_CSO where WebSiteID=1 and State=0