0

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?

2
  • Have you seen Check if a varchar is a number (TSQL)? Commented Oct 17, 2017 at 17:09
  • I will look at it. Not quite understanding how it would help me but it may just take some time. Commented Oct 17, 2017 at 17:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.