Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-08-23
10
Medium Priority
?
695 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 1000 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 500 total points
ID: 33503572
Are you using any function calls that return an int value?  Look for CONVERT, CAST, and DATEDIFF in particular...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

661 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