'select '' as sclassno,'' as sclassname,'' as srem,h.shouseno,k.shousename,h.fcurqty as fstkqty,h.flendqty,h.fbrowqty,h.fstoreamt,h.flendamt,h.fbrowamt from del2rpt316011631441565512 h,tbsstorehouse k where h.shouseno=k.shouseno and h.sclassno='' and h.shouseno in (select shouseno from del5rpt316011631441565512) union select h.sclassno,k.sclassname,k.srem,h.shouseno,m.shousename,h.fcurqty as fstkqty,h.flendqty,h.fbrowqty,h.fstoreamt,h.flendamt,h.fbrowamt from del2rpt316011631441565512 h,tbsstkclass k,tbsstorehouse m where k.sclassno=h.sclassno and m.shouseno=h.shouseno and h.shouseno in (select shouseno from del5rpt316011631441565512) and k.sclassno in(select sclassno from delc1640011252) order by sclassno,shouseno'#$D#$A 作者: sense_7 时间: 2011-12-25 23:17