Error converting data type numeric to numeric

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
bibi92Asked:
Who is Participating?
 
Kent OlsenConnect With a Mentor Data Warehouse Architect / DBACommented:
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
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.