sql case when

 string sql=@"select 会员名称,会员手机号码,会员编号,会议开始时间,
  (case when 会议室预约时常='0' then '上午'
   when 会议室预约时常='1' then '下午'
   when 会议室预约时常='2' then '晚上'
   when 会议室预约时常='3' then '全天'end) as 会议室预约时常 
 房间名称,用餐时间,套餐名称
  from V_Book ";

(case mealType 
        when '0'  then '套餐'
         when '1' then '私教' end)
        as '套餐类型'

posted @ 2013-12-09 13:40  live in finally  阅读(140)  评论(0编辑  收藏  举报