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 362151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:13:03+00:00 2026-05-12T13:13:03+00:00

I want to convert my float field into a decimal field; I want a

  • 0

I want to convert my float field into a decimal field; I want a precision of 11,2 in my decimal field, but when I tried to change the type of my field(example: Amount) I get an error: “Arithmetic overflow error converting float to data type numeric.
The statement has been terminated.”
My field is decimal(11,2) at the table, and my max and min values are: 1,603,837,393.70 < — > -1,688,000,000.00(amount).

I created a temporary table to take out the data and changed the structure of my fields and that worked o.k. but now I need to put the data back (temporary table is still having the original float fields), and I just simply cannot make it insert values with a insert select statement.

Since my values don’t exceed the range of my type I wonder why is not even possible to cast on a select statement like this:

select Id,AccountId, cast(Amount as decimal(12,2)) as Amount,
cast(AmountB as decimal(12,2)) as  AmountB
FROM myTable

I cannot identify the reason to not convert my field.

  • 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-12T13:13:03+00:00Added an answer on May 12, 2026 at 1:13 pm

    But a value of “1,603,837,393.70” would require decimal(12,2) – 12 digits in all, 2 after the decimal point.

    Maybe you misinterpreted the way the decimal(11,2) works? This would mean total of 11 digits – 9 to the left, 2 to the right of the decimal point.

    See the MSDN docs for decimal and numeric types:

    decimal[ (p[ , s] )] and numeric[ (p[, s] )]

    p (precision)

    The maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point.

    Marc

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

Sidebar

Related Questions

I want to convert a binary number into a float number. Here's an example
I want to convert float numbers from little endian to big endian but am
I want to convert a float to a NSDate I converted a NSDate into
I want to convert a column of numbers to numeric, but there are certain
I want to convert XML into binary data in Java? What is the fastest
I have a vector of float arrays i.e. Vector . I want to convert
For some complicated reason, I want to convert any supported type T (coming from
In ruby, I want to convert a float to an int if it's a
I want to convert a Python datetime to an RFC 2822 datetime. I've tried
I want to convert Float to a list of bytes [Word8] (and vice versa).

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.