当前位置:首页 » 编程语言 » 金蝶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.

热点内容
我的世界服务器的反外挂系统 发布:2025-01-06 15:06:15 浏览:414
通达信编译 发布:2025-01-06 14:52:26 浏览:777
nltk中文python 发布:2025-01-06 14:25:27 浏览:974
安卓如何格机删掉系统应用 发布:2025-01-06 14:16:29 浏览:530
android异常退出 发布:2025-01-06 14:12:22 浏览:521
vbsql数据库查询 发布:2025-01-06 14:02:59 浏览:329
手机存储空间小会影响数据网络吗 发布:2025-01-06 14:02:52 浏览:313
安卓手机如何把手游变成端游 发布:2025-01-06 14:02:50 浏览:23
星球基地源码 发布:2025-01-06 13:57:58 浏览:190
手机淘宝前面的密码是什么 发布:2025-01-06 13:44:02 浏览:141