码迷,mamicode.com
首页 > 其他好文 > 详细

0117

时间:2019-01-17 14:02:14      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:current   code   select   商品   group   art   asc   from   tst   

use UFTData502874_000009;
select a.id as 商品编号
,a.code as 编号
,a.NAME as 商品名称
,a.productInfo as 品牌
,a.specification as 规格型号
,a.lowQuantity as 最低库存量
,c.baseQuantity as 库存量单位
,c.subQuantity as 库存量辅单位
from dbo.AA_Inventory a
left join (select idinventory,baseQuantity,subQuantity from ST_CurrentStock)c on c.idinventory=a.id

--left join dbo.ST_CurrentStock c on c.idinventory=a.id
--where a.lowQuantity is not null
--group by a.id,a.code,a.NAME,a.specification,a.lowQuantity

-- group by id,code,NAME,specification,lowQuantity
-- group by a.id,a.code,a.NAME,a.specification,a.lowQuantity
-- ST_CurrentStock -- 现存量表

-- select idinventory from dbo.ST_CurrentStock

select idinventory,pa.name
from dbo.Pu_PurchaseRequisition_b b
left join (select * from dbo.Pu_PurchaseRequisition)p on p.id=b.idPurchaseRequisitionDTO
left join (select * from dbo.AA_Partner )pa on pa.id=p.id;


select * from dbo.Pu_PurchaseRequisition p
left join (select * from dbo.AA_Partner )pa on pa.id=p.id;

-------------------------------------------------------

use UFTData502874_000009;
select * from dbo.AA_Partner where name like‘%公司%‘;

select * from dbo.AA_Partner where name like‘%凤祥%‘;

select * from dbo.AA_Partner where code=‘010003‘;

-- 类型为1 的是 供应商公司
select * from dbo.AA_Partner where idpartnerclass=‘1‘ order by code asc;

-- 公司编号 code 010001
-- 供应商的ID 等于 采购单的 idsuggpartner


select * from dbo.Pu_PurchaseRequisition

--insert into dbo.Pu_PurchaseRequisition

0117

标签:current   code   select   商品   group   art   asc   from   tst   

原文地址:https://www.cnblogs.com/danJuly/p/10281702.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!