日期:2014-05-17 浏览次数:20496 次
select b.oid, userInfo+' 预定'+b.mealCount+'份',b.insertTime,b.getTime,s.suppName,
b.bookReason, case b.isEnter when '0' then '否' when '1' then '是' end isEnter,
case b.isBack when '0' then '否' when '1' then '是' end isBack
from BookMealRecord b
left join (select d.departmentName+'——'+u.userName,u.userId userInfo
from UserInfo U
left join Department d
on u.userInDepartmentId=d.departmentId) A on b.userId=A.userInfo
left join SupplierInfo s on s.suppId=b.SupplyId
SELECT b.oid ,
a.userInfo + ' 预定' + b.mealCount + '份' ,
b.insertTime ,
b.getTime ,
s.suppName ,
b.bookReason ,
CASE b.isEnter
WHEN '0' THEN '否'
WHEN '1' THEN '是'