热门关键词用友NC 用友U8 用友U9 T+ 好业财 T3 好会计

    详细信息

    您现在的位置:网站首页 >> 百科问答 >> 详细信息

    畅捷通t3软件总帐记帐时提示这个报错:运行时错误2147217873

    发布时间:2026-7-25  

    特价活动:>>>> 畅云管家新购、续费7折优惠,畅捷通T+cloud、好会计、易代账、好业财、好生意云产品8折优惠 

    问题现象:用友T3软件,总帐记帐时提示这个报错:运行时错误2147217873,违反了PRIMAY_KEY约束gl_mpostcond1中插入重复键。

    处理方法:

    这个一般是数据库出错,处理方法是清空 gl_mpostcond1,进入sql管理器里,执行sql代码:delete  gl_mpostcond1

    清除后可以记帐,但是在反记后在去记帐还是报这样的错误。如何彻底解决该问题,找到演示帐套的存储过程 GL_P_JZFA所有任务-生成SQL脚本。
    然后在出现问题的帐套找到这个存储过程,然后删除.找到刚才生成的脚本在当前的帐套年度生成下就可以了。
    如果这样还不行。就把存储过程中GL_P的中带JZ的都删除。从999中生成脚本然后在执行,这样绝对可以解决。

    或者执行脚本
    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

     

     

    上一篇:甘孜藏族自治州用友T3软件如何设置自定义纸型打印凭证?

    客服电话:400-665-0028

    关键字:用友财务软件,畅捷通软件,财务软件,进销存软件,U9官网,用友U8,用友T1,用友T+,用友T3,用友T6,畅捷通好会计,好生意,智+好业财,用友培训服务售后公司,畅捷通运营培训服务公司

    版权所有:用友畅捷通软件 Copyright © 2026 All rights reserved.

    鲁ICP备2020041017号-6