在线精品亚洲一区二区绿巨人,亚洲精品456在线播放,337P日本欧洲亚洲大胆色噜噜,十八禁无码免费网站

北京松源偉立科技有限公司

咨詢熱線:158-0117-0786
咨詢直線:158-0117-0786
公司傳真:
公司網(wǎng)址: dicasdavida.com
公司地址:北京市朝陽區(qū)區(qū)芍藥居北里
首頁  ?   知識庫  ?  用友T3   ?  運(yùn)行時錯誤‘-2147217873(80040e2f)

運(yùn)行時錯誤‘-2147217873(80040e2f)

來源:原創(chuàng) 發(fā)布時間:2017-03-21 15:54:50
記賬的時候發(fā)現(xiàn)的錯誤,老的T3 10.8PLUS普及版的 用友T3財務(wù)軟件在記賬的時候提示錯誤:運(yùn)行時錯誤‘-2147217873(80040e2f)\':違反了PRIMMARY KEY 約束‘GL-mpostcond1_pk"不能在對象‘GL-Mpostcond1中鍵入重復(fù)鍵
網(wǎng)上有賣工具的,其實用查詢分析器就可以解決
1.如果是用友T310.8plus1之前的版本,請先在查詢分析器中執(zhí)行如下腳本:

use ufdata_xxx_2014

delete from gl_mpostcond1
2.查詢分析器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
搞定
首頁  |   知識庫  |   軟件產(chǎn)品  |   新聞動態(tài)  |   成功案例  |   解決方案  |   產(chǎn)品下載  |   關(guān)于我們  |   聯(lián)系我們
版權(quán)所有:北京松源偉立科技有限公司   公司地址:北京市朝陽區(qū)區(qū)芍藥居北里   客服信箱: service@bjyongyou.com   熱線:158-0117-0786
關(guān)鍵詞:北京用友軟件,財務(wù)軟件,北京用友,北京財務(wù)軟件,用友軟件,進(jìn)銷存軟件,會計電算化軟件,用友U8,用友T6,用友T3,用友財務(wù)通,用友企業(yè)管理軟件    京ICP備15017070號-1