Arithmetic overflow error converting numeric to data type numeric [closed]

1

I have the following error when executing a script:

  

Arithmetic overflow error converting numeric to data type numeric.

I have a table called TBL_ADENDA_ACH in a development database and I run the following script:

SELECT * FROM TBL_ADENDA_ACH WITH(NOLOCK)
WHERE Num_Referencia= 008888002000552

This works fine, but when executing it in the same table but in the production environment it gives the aforementioned error, I already checked the data types, length, collation but the inconvenience follows.

    
asked by Donovan 07.02.2017 в 20:03
source

1 answer

0

Because of the error message, it is definitely a length problem.

Num_Referencia tipo: varchar, longitud:15, not null, Collatio:SQL_Latin1_General_CP850_CI_AI

You can solve the problem by changing the length of the field to 18.

    
answered by 07.02.2017 в 23:27