Solved

Error converting data type numeric to numeric

Posted on 2014-01-23
2
230 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:
Kdo 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

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…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now