當前位置:首頁 » 編程語言 » 金蝶sql語句

金蝶sql語句

發布時間: 2024-12-03 22:57:05

❶ 誰幫我寫個金蝶軟體sql語句

這個題目寫的有點問題1、即時庫存不是用icbal或者icinvbal,應該用icinventory2、庫存要關聯 t_icitem 物料表 t_measureunit 計量單位 t_stock 倉庫ps:1、用icbal或者icinvbal這兩個表寫也是可以的,但你要對未核算的單據的數據進行計算,這復雜多了需要做個復雜的存儲過程2、你的價格可以重icbal或者icinvbal中取,肯定比你的計劃單價實際3、最准確的是通過所有的單據計算,復雜可想而知,但你可以跟蹤一下軟體再算收發匯總表的時候用的語句,借鑒過來肯定會省不少事情。4、如果是我,我會用上面的方法,根據單據,以及所有的物料的計價方法去算

❷ 請問如何能獲取金蝶K3的【報表分析】的SQL語句

Select t4.FItemID,Sum(t4.FQty) As FQty
Into #ICInventory
From ICInventory t4 Inner Join t_ICItem t1 On t1.FItemID=t4.FItemID
Inner Join t_Stock t3 On t4.FStockID=t3.FItemID
Where 1 = 1
Group By t4.FItemID
Insert Into #ICInventory Select t4.FItemID,Sum(0) As FQty
From ICInventory t4 Inner Join t_ICItem t1 On t1.FItemID=t4.FItemID
Inner Join t_Stock t3 On t4.FStockID=t3.FItemID
Where 1 = 1
and t4.FItemID Not In (Select Distinct(FItemID) From #ICInventory)
Group By t4.FItemID
Insert Into #ICInventory Select t1.FItemID,0 From T_ICItem t1
Where t1.FItemID Not In (Select Distinct(FItemID) From ICInventory)
Select t5.FName As FClassName, t2.FShortNumber,t2.FNumber,t2.FName,t2.FModel,t2.FQtyDecimal,
t3.FName As FBUUnitName,ROUND(t1.FQty, t2.FQtyDecimal) As FActBUUnitQty,t2.FSecInv As FSecInvBUUnitQty,
FBUUnitDiff=ROUND(t1.FQty-t2.FSecInv, t2.FQtyDecimal),
t4.FName As FCUUnitName,ROUND(t1.FQty/t4.FCoeffiCient, t2.FQtyDecimal) As FActCUUnitQty,ROUND(t2.FSecInv/t4.FCoeffiCient, t2.FQtyDecimal) As FSecInvCUUnitQty,
FCUUnitDiff=ROUND(t1.FQty/t4.FCoeffiCient-t2.FSecInv/t4.FCoeffiCient,t2.FQtyDecimal),
FStatus=(Case When ROUND(t1.FQty ,t2.FQtyDecimal) - t2.FSecInv < 0 Then '庫存不足' Else '' End),FSumSort=0
Into #temp
From #ICInventory t1 Inner Join t_ICItem t2 On t1.FItemID=t2.FItemID
Inner Join t_MeasureUnit t3 On t2.FUnitID=t3.FMeasureUnitID
Inner Join t_MeasureUnit t4 On t2.FStoreUnitID=t4.FMeasureUnitID
Left Join t_Item t5 On t2.FParentID=t5.FItemID
where (t1.FQty/t4.FCoeffiCient-t2.FSecInv/t4.FCoeffiCient)<0 order by t2.FNumber IF EXISTS(Select * From #TEMP)
Insert Into #Temp
Select '','','','合計','',4,
'',Sum(FActBUUnitQty),Sum(FSecInvBUUnitQty),Sum(FBUUnitDiff),
'',Sum(FActCUUnitQty),Sum(FSecInvCUUnitQty),Sum(FCUUnitDiff),
'',101
From #temp
Select * From #temp Where FBUUnitDiff<0 Order By FSumSort,FSecInvBUUnitQty ASC
Drop Table #icinventory
Drop Table #temp

❸ 金蝶K3 中的銷售出庫sql語句怎麼寫

SELECT *FROM vwICBill_8
這是顯示出庫單的 視圖;也是最好掌握的。

❹ 在金蝶的SQL中查詢不也數據來

ON u1.FItemID = t14.

熱點內容
靜態網頁放在伺服器上如何訪問 發布:2024-12-04 17:00:23 瀏覽:854
安裝愛快軟體需要什麼伺服器 發布:2024-12-04 16:56:11 瀏覽:819
oracle資料庫名查詢 發布:2024-12-04 16:54:32 瀏覽:450
前端app安卓怎麼適配 發布:2024-12-04 16:53:51 瀏覽:392
模型網源碼 發布:2024-12-04 16:44:59 瀏覽:859
任天堂網路伺服器地址 發布:2024-12-04 16:39:10 瀏覽:679
dsp編程入門 發布:2024-12-04 16:36:48 瀏覽:78
sqlserver刪除表數據 發布:2024-12-04 16:36:47 瀏覽:258
漫播下載的廣播劇存儲路徑 發布:2024-12-04 15:41:21 瀏覽:838
rc2在線加密 發布:2024-12-04 15:32:58 瀏覽:87