Arithmetic overflow error sql

86 Views Asked by At

I originally imported these files using the Import and Export Wizard from a fixed width file. I had planned to have the field in question, firms, as numeric (8,0) but I was getting an error about data type conversion failed. So I changed it varchar (20) and it imported successfully. There are roughly 1.48 million rows in the table.

Now, I am trying to change it back to numeric (8,0) or INT and both give me an arithmetic overflow error. I used the following code to find the maximum length of values in the column

select(max(len(firms)) from dbo.tablename and it returned a value of 5.

Any insights on how to remedy this?

0

There are 0 best solutions below