selecte.fileno,b.waresimname,b.warename,b.warespec,dbo.f_get_classname(b.wareid,’03’,1) jx,max(b.purprice * 1.55) as price,sum(a.wareqty – a.awaitqty) as wareqty,
1 zk,b.barcode,dbo.f_get_classname(b.wareid,’08’,1) fl,producer,a.wareid,max(c.batchno+c.idno) as batid,1 zl,max(b.purprice) as purprice,max(c.makeno) as makeno,max(c.makedate) as makedate,max(c.invalidate) as ivalidate
from u_store_c a inner join u_ware_q b on a.wareid = b.wareid
inner join u_ware_ext e on a.wareid = e.wareid
inner join u_store_i c on a.wareid = c.wareid and a.batchno = c.batchno and a.idno = c.idno
where a.wareqty > 0 and a.busno in (‘0000′,’196′,’234′,’118′,’197′,’100’)
and b.warename not like ‘%YW%’
group by e.fileno,b.waresimname,b.warename,b.warespec,b.wareid,
b.barcode,producer,a.wareid,b.warename and (b.warename not like ‘%YW%’ or b.warename not like ‘%XY%’ )
|