如何通過金蝶分析一段時間(主要)各**商供貨數量和金額佔(主要)**商總數量和總金額的比例。
select distinct
(select sum(fauxqty) from icstockbill v1 inner join icstockbillentry u1 on v1.finterid = u1.finterid and u1.finterid <>0 inner join t_supplier t4 on v1.fsupplyid = t4.fitemid and t4.fitemid <>0
where 1=1 and ( t4.fnumber = 'a**商**' or t4.fnumber = 'b**商**' or t4.fnumber = 'c**商**' )
and (v1.fdate >= '********' and v1.fdate <= '########' )
and (v1.ftrantype=1 and (v1.fcancellation = 0))) as 總數量,
---如果還需要增加其他**商可以在後面增加or t4.fnumber = 'd**商**',這句是計算這幾個**商供貨數量的總和
(select sum(fauxqty) from icstockbill v1 inner join icstockbillentry u1 on v1.finterid = u1.finterid and u1.finterid <>0 inner join t_supplier t4 on v1.fsupplyid = t4.fitemid and t4.fitemid <>0
where 1=1 and t4.fnumber = 'a**商**' and (v1.fdate >= '********' and v1.fdate <= '########'
) and (v1.ftrantype=1 and (v1.fcancellation = 0))) as a**商數量總和,
--單獨計算a**商供貨數量
(select sum(fauxqty) from icstockbill v1 inner join icstockbillentry u1 on v1.finterid = u1.finterid and u1.finterid <>0 inner join t_supplier t4 on v1.fsupplyid = t4.fitemid and t4.fitemid <>0
where 1=1 and t4.fnumber = 'a**商**' and (v1.fdate >= '********' and v1.fdate <= '########' )
and (v1.ftrantype=1 and (v1.fcancellation = 0)))
/(select sum(fauxqty) from icstockbill v1 inner join icstockbillentry u1 on v1.finterid = u1.finterid and u1.finterid <>0 inner join t_supplier t4 on
v1.fsupplyid = t4.fitemid and t4.fitemid <>0 where 1=1 and ( t4.fnumber = 'a**商**' or t4.fnumber = 'b**商**' or t4.fnumber = 'c**商**')
and (v1.fdate >= '********' and v1.fdate <= '########' ) and (v1.ftrantype=1 and (v1.fcancellation = 0)) ) as a**商數量百分比,
--a**商數量總和除以總數量,就是上面第二段select 語句除第一段select語句得出了百分比,其他**商計算依次類推
from icstockbill v1 inner join icstockbillentry u1 on v1.finterid = u1.finterid and u1.finterid <>0 inner join t_supplier t4 on v1.fsupplyid = t4.fitemid and t4.fitemid <>0
where 1=1 and ( t4.fnumber = 'a**商**' or t4.fnumber = 'b**商**' or t4.fnumber = 'c**商**' )
and (v1.fdate >= '********' and v1.fdate <= '########' ) and (v1.ftrantype=1 and (v1.fcancellation = 0))
--如果需要計算金額,可以把語句的fauxqty全部替換成famount,這種方法比較簡單和直接,但是語句比較長(**商多的話).
統計供應商個數
統計 商個數 create trigger dbo t supplyentry luyu 自定義觸發器的名稱 on dbo t supplyentry 商供貨明細表,觸發器的表名,意為在哪個表建立觸發 for update,delete 觸發型別 insert update delete 分別意為插...
優質供應商選擇標準 優秀供應商評選標準
優秀 商評選標準 評選 商標準主要有 合適的商品質量。採購商品的質量合乎採購單位的要求是採 購單位進行商品採購時首先要考慮的條件。對於質量差 偏低的 商品,雖然採購成本低,但會導致企業的總成本增加。因為質量不合 格的產品在企業投入使用的過程中,往往會影響生產的連續性和產成 品的質量,這些最終都會反映...
InfiniBand OS 供應商支援
mellanox infiniband 驅動程式 協議軟體和工具由其各自的主要作業系統 商和分布式系統收件箱提供支援,或在另有說明的情況下由 mellanox 提供支援。mellanox 還可支援所有主要處理器架構。mellanox infiniband 驅動程式和 ulp 均已經過測試和驗證,可支...