首页 关于我们 >新闻资讯 金蝶软件 实施流程 在线预约 服务咨询 联系我们 常见问题
金蝶KIS专业版常用SQL语句
2020-02-26

由于结束初始化后很多参数不能在金蝶软件里直接修改,所以要借助SQL查询分析器。
1.允许负库存
Update t_systemprofile Set FValue=0 where FCategory='IC' And FKey='UnderStock'
Fvalue = 1 不允许负库存
Fvalue = 0 允许负库存
2.库存更新控制
Update t_systemprofile set FValue=0 where FCategory='IC' and FKey='UPSTOCKWHENSAVE'
Fvalue = 0 单据审核后更新
Fvalue = 1 单据保存后更新
*****************************************************************************
 
*****************************************************************************
一客户新建立帐套,录入物料及数量后,代码作大的变更,需要重新导过,因为其他系统正常,就采用了删除物料,重新导入的方法:
   1.删除仓库数据,
若启用了业务系统,删除delete from icbal
若没有启用业务系统,删除delete from IcInvbal
   2.删除BOM表
delete from ICbomChild
delete from Icbom
delete from ICBomgroup
3.删除物料;
    要删除物料,先删除附属信息表。
select * from t_icitembase where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitembase where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemcore where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemcustom where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemdesign where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemmaterial where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemplan where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemquality where fitemid in (select Fitemid from t_item   where fitemclassid=4)
delete from t_icitemstandard where fitemid in (select Fitemid from t_item   where fitemclassid=4)
--其中Fitemclassid为4,是表示4代表物料类。接下来删除物料;
delete from t_item   where fitemclassid=4 or fitemclassid=2001
--其中2001代表物料的成本对象。
    然后重新导入数据即可!记得删除数据前一定要备份!
*****************************************************************************
下面是删除固定资产卡片的语句,这些语句是在K/3v10.3里执行的,同样适用于KIS专业版,清空固定资产卡片:
--删除固定资产卡片余额表
delete from t_FACard
delete from t_FACardItem
delete from t_FADept
delete from t_FAOrgFor
delete from t_FAVoucher
delete from t_FAExpense
delete from t_FAClear
delete from t_faalter --主表
-----删除固定资产表
delete from t_FABalCardItem

bottom-map
昆山云数软件信息技术有限公司 2007-2020 @ All Rights Reserved 苏ICP备15052466号-1
友情链接: 百度 金蝶官网 云数建站 金蝶精斗云