Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- so_m.dverifydate 销售订单审核日期,
- so_m.cSOCode 销售订单号,
- dept.cDepName 部门名称,
- inv_cls.cInvCName 品牌,
- inv_cls.cInvCCode 存货大类编码,
- so_d.cInvCode 存货编码,
- so_d.iSum 金额
- FROM [dbo].[SO_SOMain] so_m
- LEFT JOIN SO_SODetails so_d
- ON so_d.ID = so_m.ID
- LEFT JOIN Inventory inv
- ON inv.cInvCode = so_d.cInvCode
- LEFT JOIN InventoryClass inv_cls
- ON inv_cls.cInvCCode = inv.cInvCCode
- LEFT JOIN Department dept
- ON dept.cDepCode = so_m.cDepCode
- WHERE so_m.cDepCode = '010405'
- AND so_m.dverifydate BETWEEN '2023-02-20' and '2023-02-24'
- AND inv_cls.cInvCName = 'CATO'
- ORDER BY so_m.dverifydate desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement