日期:2014-05-17 浏览次数:20849 次
select d.code,d.num*(-1) as 'SZ',null as 'HK',null as 'SS',null as 'SH' from 出货详细单 as D,出货单 as t where t.orderno=d.orderno and t.outlib='A' and t.nouse='' union all select d.code,null as 'SZ',d.num*(-1) as 'HK',null as 'SS',null as 'SH' from 出货详细单 as D,出货单 as t where t.orderno=d.orderno and t.outlib='B' and t.nouse='' union all select d.code,null as 'SZ',null as 'HK',d.num*(-1) as 'SS',null as 'SH' from 出货详细单 as D,出货单 as t where t.orderno=d.orderno and t.outlib='C' and t.nouse='' union all select d.code,null as 'SZ',null as 'HK',null as 'SS',d.num*(-1) as 'SH' from 出货详细单 as D,出货单 as t where t.orderno=d.orderno and t.outlib='D' and t.nouse=''