Solved

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

Posted on 2010-08-23
10
689 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 93

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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
 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.

627 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