发布时间:2019-09-20 12:53:58
前边的不变,where 后用or连接
select fitemid, recInNum, recOutNum from (select t1.fitemid, t1.fqty as recInNum from icstockbillentry t1 left join icstockbill t2 on t1.finterid = t2.finterid where t2.fbillno like 'WIN%') a left join (select t1.fitemid, t1.fqty as recOutNum from icstockbillentry t1 left join icstockbill t2 on t1.finterid = t2.finterid where t2.fbillno like 'SOUT%') b on a.fitemid = b.fitemid