用友T3财务软件在记账的时候提示错误:运行时错误‘-2147217873(80040e2f)':违反了PRIMMARY KEY 约束‘GL-mpostcond1_pk"不能在对象‘GL-Mpostcond1中键入重复键。如下图所示:
也有不少的财务会计朋友是在使用用友通T3软件的返记账过程中提示的。那么怎么解决这个问题呢?
经过用友财务软件小编跟踪数据库发现主要是软件考虑的不够周全,后来用友畅捷通在用友T310.8plus1标准版及后续版本使用补丁做了改进了,所以解决这个问题要看版本。
如果是用友T310.8plus1之前的版本,请先在查询分析器中执行如下脚本:
use ufdata_xxx_2014
delete from gl_mpostcond1
然后再执行如下脚本,避免后续出现类似的问题。
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
ALTER Proc [dbo].[GL_P_JZA](@iPer tinyint = 11, @ccash tinyint =1, @tcond varchar(5000)= '') AS SET NOCOUNT On declare @ss varchar(8000)
declare @Checkflag varchar(20) declare @trnd bigint set @trnd=(select convert(bigint,rand()*100000000000)) declare @temptable varchar(50) declare @temptable2 varchar(50) set @temptable='GL_jztmp'+ convert(varchar(30),@trnd) set @temptable2='gl_bookB'+ convert(varchar(30),@trnd) set @Checkflag = (SELECT cvalue FROM AccInformation WHERE cSysID='GL' AND cName='bNotCheckJz')
Delete From GL_mpostcond1 if @ccash=0 begin
if @Checkflag = 'False' set @ss='SELECT iperiod,isignseq,ino_id From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (not (ccheck is null) and iflag is null or ccheck is null and iflag=1) GROUP BY iperiod,isignseq,ino_id' else set @ss='SELECT iperiod,isignseq,ino_id From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (iflag is null or ccheck is null and iflag=1) GROUP BY iperiod,isignseq,ino_id'
Insert GL_mpostcond1 exec (@ss) End Else begin if not object_id('tempdb..'+@temptable) is null exec('drop table tempdb..'+ @temptable)
if @Checkflag = 'False' set @ss='SELECT isignseq,ino_id,1 as zt into tempdb..'+@temptable+' FROM gl_accvouch inner join code ON gl_accvouch.ccode = code.ccode where ibook=0 and iperiod= '+convert(char,@iPer,0)+(case when @tcond='' then '' else ' and (' + @tcond + ')' end) +' and ((code.bbank ^ code.bcash) =1) and ((not (ccheck is null)) and (ccashier is null)) GROUP BY isignseq,ino_id Union SELECT isignseq,ino_id,0 as zt From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (not (ccheck is null) and iflag is null or ccheck is null and iflag=1) GROUP BY isignseq,ino_id' else set @ss='SELECT isignseq,ino_id,1 as zt into tempdb..'+@temptable+' FROM gl_accvouch inner join code ON gl_accvouch.ccode = code.ccode where ibook=0 and iperiod= '+convert(char,@iPer,0)+(case when @tcond='' then '' else ' and (' + @tcond + ')' end) +' and ((code.bbank ^ code.bcash) =1) and (ccashier is null) GROUP BY isignseq,ino_id Union SELECT isignseq,ino_id,0 as zt From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (iflag is null or ccheck is null and iflag=1) GROUP BY isignseq,ino_id'
exec (@ss) exec('SELECT isignseq,ino_id,sum(zt) as zt1 into tempdb..' + @temptable2 + ' from tempdb..'+@temptable+' group by isignseq,ino_id') set @ss='select '+convert(char,@iPer,0)+' as iperiod,isignseq,ino_id from tempdb..' + @temptable2 + ' Where zt1 = 0 '+(case when @tcond='' then '' else ' and (' + @tcond + ')' end) insert GL_mpostcond1 exec (@ss) if not object_id('tempdb..'+@temptable2) is null exec('drop table tempdb..'+ @temptable2) End
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
如果是用友T310.8plus1之后的版本,包括用友T310.8plus1普及版和标准版请直接安装最新的补丁就行了,补丁下载地址在论坛中有哦:http://edu.zzerp.net。
温馨提示:近期载地址失效频繁,如链接失效请点击此处查阅详情!
今天在给一个用友T3的客户实施的时候碰到一个难题,他公司生产车间的固定资产需要按季度来计提折旧,一时之间我还真没想到办法,后来回家在用友T3软件中摸索了一下。目前用友T3...
问:用友财务软件-T3企管通在使用导入导出工具时,利用“数据导入导出工具”的“导出”功能,将数据导出成功后,找不到存放的文件。答:提示导出成功后需要下...
最近有不少用windows 7操作系统的朋友,参考win7安装用友软件的图文教程安装好用友T3财务软件后,重启电脑,提示错误,具体提示信息如下:用友T3标准版 已停止工作 Windows 可以联机检...
问题现象:用友T3财务软件UFO报表取数慢怎么解决?每次出具财务报表的时候都要等半天才能取出数据?解决方案:首先需要看一下取数慢慢到什么程度,是不是中间有未响应的情况?再看一下账套是否有过多的二级科目...
畅捷通T3用友通标准版试用版下载地址:点击下载畅捷通T3用友通标准版试用版。 畅捷通T3用友通标准版各模块及模块主要功能如下: 2.1 总账总账系统将财务...
问:在使用用友财务软件-用友T3企管通导入存货档案时提示:“计量单位不能为空”,但在导入文件中存货的计量单位已存在,如何处理?答:在企管通的“计量单位&rdquo...