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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:31:12+00:00 2026-06-06T09:31:12+00:00

Is there any way to change(increase) the data type of a column while saving

  • 0

Is there any way to change(increase) the data type of a column while saving the values into a temporary table?

SELECT TableA.ID_NO, sum(TABLEA.COST * TABLEB.QTY) as TOTAL
INTO #matCalc
FROM TABLEA A 
INNER JOIN TABLEB 
ON A.ID_NO = B.ID_NO

We have a bigger calculation in the actual query. When we execute our stored proc we get an error “arithmetic overflow error converting numeric to data type numeric”.

Any solution is greatly appreciated.

Thank you.

  • 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-06-06T09:31:13+00:00Added an answer on June 6, 2026 at 9:31 am

    Just explicitly cast the numeric as a larger type. I’m using 18,2 as an example, but I don’t know your data, so different precision / scale may work better for you:

    SELECT TableA.ID_NO, 
      SUM(CONVERT(DECIMAL(18,2), TABLEA.COST) * TABLEB.QTY) as TOTAL
    INTO #matCalc
    FROM TABLEA A 
    INNER JOIN TABLEB 
    ON A.ID_NO = B.ID_NO;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to change the selection bar text color in a list
Is there any way to change the Facebook album privacy settings with graph api
Is there any way to change the BackColor of the border of a panel
Is there any way to change the icon of an application after it is
Is there any way to change default font of controls in winforms. I must
Is there any way to change settings for multiple projects in a Visual Studio
Is there any way to change the value of property at runtime in WPF
I have a link as bellow. Is there any way to change info@example.co.uk with
Is there any way i can change the toggle function or any of it's
Is there any way to change Firefox system icon (the one on the left

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.