Solved

Finding the column with Arithmetic overflow error converting expression to data type int.

Posted on 2010-08-23
10
668 Views
Last Modified: 2012-05-10
In the attached code, I am getting the error

Msg 8115, Level 16, State 2, Line 2
Arithmetic overflow error converting expression to data type int.

after getting the values for 20 rows.

are you able to get an idea which column gives the error with the error message?

thanks
spspaceused.txt
0
Comment
Question by:anushahanna
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 42

Accepted Solution

by:
dqmq earned 250 total points
ID: 33503441
Common sense + trial and error.

Focus on int columns that you are making bigger.  Like this one:

      [size_available_bytes] [int]
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33503461
thanks dqmq. I made all the int's into bigint's; still same issue.
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 125 total points
ID: 33503572
Are you using any function calls that return an int value?  Look for CONVERT, CAST, and DATEDIFF in particular...
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33503591
no, it is a straight insert-select statement. (please remove the - in the select, if you run the query).
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33504357
Can you post your SQL Statement here. We can help!
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Author Comment

by:anushahanna
ID: 33504370
please see attached in the beginning of the post.please remove the - in the select command.
0
 
LVL 8

Assisted Solution

by:Mohit Vijay
Mohit Vijay earned 125 total points
ID: 33504449
Run only Select Statement, If it is returning results, check columns, it should be compitable data with your tmp_size table. take extra eye on int and bigint column. It might be possible that your select statement is returning values that is not be convertible in int, bigint.
0
 
LVL 42

Assisted Solution

by:dqmq
dqmq earned 250 total points
ID: 33504575
May need to comment out half the columns and retry.  Continue to narrow it down that way.  That's what I meant by trial and error.

There's also a remote possibility the error occurs while joining, but I can't see how.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33504600
OK. I expanded the numeric columns and also used bigint, so it was probably one of those columns- thanks for the hint and idea.

appreciate you experts.
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33507754
Is your problem solved?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now