Páginas filhas
  • CTU - What to do in case of balance update error in CTUXX0 (Cannot insert duplicate key row in object)

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

What should I do if the following error.log occurs when executing the Results Calculation routine:

THREAD ERROR (ZZZZZZ, XXXXX)   06/03/2012 15:18:26

Error updating balances in CTU010

Proccess Cancelledo

Error : 2601 (23000) (RC=-1) - [Microsoft][SQL Native Client][SQL Server]Cannot insert duplicate key row in object ‘dbo.CTU010‘ with unique index ‘CTU010_UNQ‘. ( From tDBServer::SQLExec )

Thread ID [4084]              User [Antonio                  ]              IO [24638]           Tables [29]        MaxTables [29]               Comment [CTBA210 - TCPIP]           Status []              SP [ ]     Traced [No]       InTran [No]        DBEnv [MSSQL/DADOS10]          DBThread [(SPID: 65) ]       Started [06/03/2012 15:10:24]   LastIO [06/03/2012 15:18:26]     IP [172.30.202.81]           RCV [1710827] SND [3316310]            TCBuild [20100602]       

UPDATE CTU010 SET CTU_LP = ‘S‘, CTU_DTLP = ‘20111231‘ WHERE CTU_FILIAL = ‘01‘ AND CTU_MOEDA = ‘01‘ AND CTU_TPSALD =‘1‘ AND CTU_DATA >= ‘20110101‘ AND CTU_DATA <= ‘20111231‘ AND CTU_LP IN (‘N‘,‘ ‘) AND D_E_L_E_T_<>‘*‘ AND R_E_C_N_O_>=    415904 AND R_E_C_N_O_<=    430464 on CT190FLGLP(CTBA190.PRW) 14/09/2010 15:38:58 line : 2329

 

[TOTVS build: 7.00.100601A-20100727]

Called from CT211FLGLP(CTBA211.PRW) 22/12/2010 15:08:02 line : 2620

Called from CTB211PROC(CTBA211.PRW) 22/12/2010 15:08:02 line : 1255

Called from { |OSELF| IF(MV_PAR29==1 .AND. !EMPTY(XFILIAL("CT2")),                                                                                                                       

CTB211FIL(NIL,OSELF,MV_PAR30,MV_PAR31) ,                                                                                                                              

CTB211PROC(OPROCESS,OSELF) ) }(CTBA211.PRW) 22/12/2010

 
Usually, when this error occurs, the inconsistency is in the structure of the tables (field sizes) and/or is related to the data in the database.

...

Procedure for changing the size of accounting entities – 23592

Extending the number of decimal places in other currencies – 23593

Extension of the Entity Code in SigaCTB – 11346

...