Solved

Error converting data type numeric to numeric

Posted on 2014-01-23
2
278 Views
Last Modified: 2014-01-26
Hello,

Wen I try to insert 48439806668.76 in a column (numeric(18,8),null), the error Error converting data type numeric to numeric is returned.
Why?

Thanks
0
Comment
Question by:bibi92
[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
2 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 39804371
For just the one column, works for me in 2012.
CREATE TABLE #tmp (no numeric(18,4) null)
GO

INSERT INTO #tmp (no)
VALUES(48439806668.76)

SELECT * FROM #tmp
GO

Open in new window

Couple of possibilities
Are there any triggers on this table, where the error is the result of the trigger?
Is the error because of a different column in your INSERT statement?
0
 
LVL 45

Accepted Solution

by:
Kent Olsen earned 500 total points
ID: 39804394
The data overflows the descriptor.

number(18,8) is a value with 10 digits left of the decimal, and 8 to the right.

  48439806668 is 48,439,806,668

That's an 11 digit value, one too many digits to fit into 10 .



Kent
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

691 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