select A0190 as '工号', A0101 as '姓名',C2108 AS '应发',C211H AS '实发'from C21 where gz_ym = '201904' and a0188 not in (select a0188 from C21 where gz_ym= dbo.ym_s('201904') and a0191 not in ('黑名单','外包工'))and a0191 not in ('黑名单','外包工') union all
select A0190 as '工号', A0101 as '姓名',C2108 AS '应发',C211H AS '实发'from C21 where gz_ym= dbo.ym_s('201904') and a0188 not in (select a0188 from C21 where gz_ym = '201904' and a0191 not in ('黑名单','外包工'))and a0191 not in ('黑名单','外包工')
最简单的办法是两条sql语句之间用【union】连接
或者是where条件用【or】来连接