Solved

Error converting data type numeric to numeric

Posted on 2014-01-23
2
245 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
2 Comments
 
LVL 65

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

856 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