SELECT rtrim(b.djbh)+rtrim(b.rq)+rtrim(a.spbh)+rtrim(b.pihao)+rtrim(b.chkshl) as billno, 'XXX有限公司' as CompID, b.rq AS SalesTime, c.dwbh AS CustomerID, c.dwmch AS Customer, a.spbh AS ProdID, a.spmch AS Prod, a.shpgg AS Spec, '' as package, a.shpchd as manufacturer, a.dw AS Unit, b.pihao AS BatchNo, b.chkshl AS SalesAmount, b.chbdj*1.17 as SalesPrice, '' ecode FROM spkfk a,splsk b,mchk c WHERE b.dwbh=c.dwbh and b.spid=a.spid and djbh like 'XS[A,C]%' and ( (a.spmch like '%肠炎宁片%' and a.shpchd like '%天施康%') or (a.spmch like '%伤湿止痛膏%' and a.shpchd like '%康恩贝%') or (a.spmch like '%麝香壮骨膏%' and a.shpchd like '%康恩贝%') or (a.spmch like '%复方氨酚烷%' and a.shpchd like '%佐力%') or (a.spmch like '%复方鱼腥草%' and a.shpchd like '%康恩贝%') or (a.spmch like '%奥美拉唑%' and a.shpchd like '%康恩贝%')) AND b.chkshl<>0
CYN销售查询方案
原创
©著作权归作者所有:来自51CTO博客作者qvodnet的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:货位数量为负数的数量调整
下一篇:记帐数据只记部分后如何处理
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章