--纯收文办结的
SET STATISTICS TIME ON
go
select * from dbo.GWGL_PuTongShouWen where LiuZhuanZhuangTai=3 and uniqueid not in (select RHangBiaoShi from dbo.GWGL_FaWenXiangGuan where guanLianLeiXing=2 and RWenZhongBiaoShi=81 )
go
SET STATISTICS TIME OFF
go
--纯收文办结的
select * from GWGL_PuTongShouWen where LiuZhuanZhuangTai=3
EXCEPT
select * from GWGL_PuTongShouWen where UniqueID in( select RHangBiaoShi from dbo.GWGL_FaWenXiangGuan where guanLianLeiXing=2 and RWenZhongBiaoShi=81)
SET STATISTICS TIME ON
go
select * from dbo.GWGL_PuTongShouWen where LiuZhuanZhuangTai=3 and uniqueid not in (select RHangBiaoShi from dbo.GWGL_FaWenXiangGuan where guanLianLeiXing=2 and RWenZhongBiaoShi=81 )
go
SET STATISTICS TIME OFF
go
--纯收文办结的
select * from GWGL_PuTongShouWen where LiuZhuanZhuangTai=3
EXCEPT
select * from GWGL_PuTongShouWen where UniqueID in( select RHangBiaoShi from dbo.GWGL_FaWenXiangGuan where guanLianLeiXing=2 and RWenZhongBiaoShi=81)