图一是case when之前,可以筛选。图二case when之后不能筛选了 select distinct [fd_number] 请购单号,[fd_36d4df421ea2a0_text] 项目号名称,[fd_gongYingShangMingChen1] 供应商名称,[fd_385c6ecbeb1216_text] 二级物料,[fd_385c6ec2a9c54e_text] 一级物料 ,[fd_fuWuNaRongZhangHaoMingChen] 服务内容账号名称,[fd_juTiNaRong] 具体合作内容,[fd_caiGouHeJia] 请购金额,case [fd_keHuZhiDing] when 1 then '否' when 2 then '指定非垫付' else '指定垫付' end as 客户指定,[fd_gongYingShangLeiBie] 年框,[fd_qingGouDanLeiXing] 事后类型 ,[fd_kaiShiHeZuoShiJian] 开始合作时间,[fd_guiShuXiangMuHao] 项目号,t.[fd_xiaoJi] 验收金额,t.[fd_shiJiZhiXingRiQi] 实际执行时间,[fd_name] 申请人,oudp.[Name] 所属部门 from [dbo].[ekp_qinggoudan1] a inner join [dbo].[ekp_qinggoudan] b on a.[fd_parent_id] = b.[fd_id] inner join [dbo].[km_review_main] krm on krm.[fd_id]=b.[fd_id] |