回答:select * from(select fssj,dealresuit case when fssj<dateadd(30,mi,getdate()) and dealresuit in('进行中','未完成') then 1else 0 end 状态from tablewhere fssj>DATEADD(24,hh,getdate())select * from(select fssj,dealresuit case when fssj>dateadd(30,mi,getdate()) then 1else 0 end 状态from tablewhere fssj>DATEADD(24,hh,getdate()))t内容判断类似在外层也用case when报表里用状态选择显示 如未完成的值是指空值的话select * from(select fssj,dealresuit case when fssj<dateadd(30,mi,getdate()) and dealresuit is null then 1else 0 end 状态from tablewhere fssj>DATEADD(24,hh,getdate()))t