Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 column information

Author  Topic 

suman.reddy39
Starting Member

34 Posts

Posted - 2009-02-02 : 03:13:34
dear All,
i got a small problem with my query,as i m running the query i m getting an error with a message as

Arithmetic overflow error converting numeric to data type numeric.

so can u help me why this is comming.
thanks in advance

Don't go the way Life takes you, Take the Life the way you go

subbi

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-02-02 : 03:23:12
can u post u query
Go to Top of Page

thiyagu_rind
Starting Member

46 Posts

Posted - 2009-02-02 : 03:31:05
Its better to post your query..
Go to Top of Page

Jai Krishna
Constraint Violating Yak Guru

333 Posts

Posted - 2009-02-02 : 03:31:21
quote:
Originally posted by suman.reddy39

dear All,
i got a small problem with my query,as i m running the query i m getting an error with a message as

Arithmetic overflow error converting numeric to data type numeric.

so can u help me why this is comming.
thanks in advance

Don't go the way Life takes you, Take the Life the way you go

subbi


No need to convert numeric to numeric unless the precision and scale does not meet ur requirement

Jai Krishna
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-02-02 : 03:47:13
Doesn't have to be a explicit conversion problem.
Can be a range problem too.
DECLARE	@Sample TABLE
(
i NUMERIC(1)
)

INSERT @Sample
SELECT 9 UNION ALL
SELECT 9

SELECT *
FROM @Sample

SELECT CAST(SUM(i) AS NUMERIC(1))
FROM @Sample



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

suman.reddy39
Starting Member

34 Posts

Posted - 2009-02-02 : 04:24:49
thanks guys... i got it

Don't go the way Life takes you, Take the Life the way you go

subbi
Go to Top of Page
   

- Advertisement -