select a.username,d.batchcode,
case e.datastatus
when 1 then '正确'
when 2 then '无效'
when 3 then '待查'
when 4 then '重复'
end as e.datastatus,
b.direction,c.workflowname,count(*) workload
from t_systemuserinfo a,t_workflowlog b,t_genworkflow c,t_batch d,t_companyinfotmp e
where a.systemuserid=b.userid
and b.fromwkfid=c.genworkflowid
and b.batchid=d.batchid
and b.companyid=e.companyid
and b.dotime between '2008-07-29' and '2008-07-30'
group by a.username,c.workflowname,d.batchcode,e.datastatus,b.direction
[Quote=引用 1 楼 sdxiong 的回复:]
select id,name,
case status
when 1 then '优秀'
when 2 then '良好'
when 3 then '及格'
when 4 then '不及格'
end as status
from test
[/Quote]