Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 548923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:07:51+00:00 2026-05-13T11:07:51+00:00

Why does select avg(cast(5 as numeric(15,2))) returns Arithmetic overflow error converting numeric to data

  • 0

Why does

select avg(cast(5 as numeric(15,2))) 

returns “Arithmetic overflow error converting numeric to data type numeric.”?

Documentation states the following about the avg function:

input: decimal category (p, s)

output: decimal(38, s) divided by
decimal(10, 0)

I don’t really see how it would overflow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:07:52+00:00Added an answer on May 13, 2026 at 11:07 am

    Found out the problem:

    Database Properties > Options > Numeric Round-Abort was ON.

    When set to off the query executed with success.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following LINQ Select which does not work. Data.Select(d => d.Value.IsDirty =
Does SELECT TOP 1000 * FROM TABLE return the same data execution plan as
Why does select cast('''1900-01-01''' as datetime) fail in SQL Server 2005 ? It's show
SELECT airport_id Airport id, crew_type Crew type, min(crew_age) Minimum age, Round(avg(crew_age),0) Average age, max(crew_age)
why does: select 1 - '+' - CONVERT(datetime,'01/01/2010',101) ...query returns a result, and: select
I have got the following query: WITH data AS( SELECT * FROM partstat WHERE
I have a stored proc, SP1, which executes and does select on one table.
Does IO::Select in Windows work with filehandles? $pid = open $handle, -|, $_command ||
I have created a process using proc-open but under windows the stream-select does not
I was curious since i read it in a doc. Does writing select *

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.