Thursday, February 16, 2012

arithmetic overflow error

Hello,
I have a column of datatype int which has about 100000 rows and i am trying
to sum up the column and i am
getting the arithmetic overflow errror
This is the sql
Declare @.tot bigint
Select @.tot = sum(column1) from tab1
Select @.totHi,
TRY CAST(AS BIGINT)
> Select @.tot = sum(column1) from tab1
Select @.tot = sum(CAST(column1 AS BIGINT)) from tab1
SHINICHI YONEDA MXL04371@.nifty.ne.jp
Microsoft Most Valuable Professional
MVP for SQL Server 2002-2003
"SCSQL" <chalasani@.mcleodusa.net> wrote in message
news:%23TYz6iPlDHA.1728@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I have a column of datatype int which has about 100000 rows and i am
trying
> to sum up the column and i am
> getting the arithmetic overflow errror
> This is the sql
> Declare @.tot bigint
> Select @.tot = sum(column1) from tab1
> Select @.tot
>
>

No comments:

Post a Comment