数据库名: UFDATA_040_2008
D:\U8SOFT\Admin\SQLFILE10000\Main\Ufdata\Structure\Data_PRP_CA_mix_NL.sql
错误信息:
-2147217900
插入错误: 列名或所提供值的数目与表定义不匹配。
执行如下语句时出错:
Create Procedure [CA_BatchFinMx_HY]
(
@Batch nVarchar(50),
@ProductID nVarchar(20),
@Period integer,
@FinCount float
)
AS
Begin
--出完工成本明细表(还原)
SET NOCOUNT ON
-- 材料费用
insert into ca_batchmxhy_tmp
select 0,0,@period,0 ,'0' ,max(c.cinvccode) , max(c.cinvcname) , max(b.cinvcode) ,max(b.cinvname)
,max(b.cinvm_unit) , max(b.cinvstd) ,@fincount,0,sum(iqua) ,sum(itotalamo)-sum(ionptotalamo),sum(itotalamo),0, max(b.ipartid)
from ca_amoct a , ca_inventory b ,inventoryclass c where b.cinvccode=c.cinvccode and a.camoid=b.iPartID
and a.cbatch=@batch and cppid=@ProductID and iperiod=@Period and a.camotype in (0,-1)
group by camoid
-- 废品回收
insert into ca_batchmxhy_tmp
select 0,0,@period,1 ,'0' ,'' ,'', N'废品回收' ,N'废品回收'
,'' , '' ,@fincount,0,sum(iqua) ,sum(itotalamo)-sum(ionptotalamo),sum(itotalamo),0,0
from ca_amoct a where a.cbatch=@batch and cppid=@ProductID and iperiod=@Period and a.camoid='-1' and a.camotype='0'
group by camoid
-- 制造费用
insert into ca_batchmxhy_tmp
select 0,0,@period,2,'3','','',max(b.camoid),max(b.camoname)
,'','',@fincount,0,sum(iqua),sum(itotalamo)-sum(ionptotalamo),sum(itotalamo),0,0
from ca_amoct a,caq_manufacture b where a.camoid=b.camoid
and a.cbatch=@batch and a.cppid=@ProductID and iperiod=@Period and a.camotype=3
group by a.camoid
-- 辅助费用
insert into ca_batchmxhy_tmp
select 0,0,@period,3,'2','','',max(b.cprocedureid),max(b.cprocedurename)
,max(b.cunit),'',@fincount,0,sum(iqua),sum(itotalamo)-sum(ionptotalamo),sum(itotalamo),0,0
from ca_amoct a,ca_predf b where a.camoid=b.cprocedureid
and a.cbatch=@batch and a.cppid=@ProductID and iperiod=@Period and a.camotype=2
group by a.camoid
-- 其他费用
insert into ca_batchmxhy_tmp
select 0,0,@period,4,'4','','',max(b.camoid),max(b.camoname)
,'','',@fincount,0,sum(iqua),sum(itotalamo)-sum(ionptotalamo),sum(itotalamo) ,0,0
from ca_amoct a,caq_others b where a.camoid=b.camoid
and a.cbatch=@batch and a.cppid=@ProductID and iperiod=@Period and a.camotype=4
group by a.camoid
-- 人工费用
insert into ca_batchmxhy_tmp
select 0,0,@period,5,'1','','','',N'直接人工'
,'','',@fincount,0,sum(iqua),sum(itotalamo)-sum(ionptotalamo),sum(itotalamo),0,0
from ca_amoct a where
a.cbatch=@batch and a.cppid=@ProductID and iperiod=@Period and a.camotype=1
group by a.camoid
-- 先将由总耗量算出完工的耗量
update ca_batchmxhy_tmp set qua = totalqua / totalamo * amo where totalamo <>0 and period = @period
End
用友U890升级到10.0报错哪位帮我改一下
答案:2 悬赏:0 手机版
解决时间 2021-12-30 06:47
- 提问者网友:别再叽里呱啦
- 2021-12-29 06:47
最佳答案
- 五星知识达人网友:大漠
- 2021-12-29 07:17
这种错误没法改,建议恢复账套后先在U890的补丁升级工具里下载并安装关键的补丁,然后在升级到U8.10
全部回答
- 1楼网友:旧脸谱
- 2021-12-29 07:31
有破解,20万可能只买几个模块的,20万算什么,我们公司100多万呢,用的是u852的,u890有破解的,自己找一下老王给黑医生的16用户的,那个好用,你一定分不给,所以就不给你了,自己找
希望采纳
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯