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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Arithmetic overflow error for type int
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 09/16/2006 :  02:04:57  Show Profile  Reply with Quote
i have to calculate
power(2,32) in SQL Server Enterprise Manager.
here 32 is obtained through a series of calculations. no problem there. Error is in calculating power.
I am getting the foll error
Arithmetic overflow error for type int value = 4294927696.00000000
i tried convert(bigint,power(2,32)) but no use since conversion will anyway take place only after power is calculated which again gives the same error.

In (Som, Ni, Yak)

17689 Posts

Posted - 09/16/2006 :  04:25:03  Show Profile  Reply with Quote
power(2.0, 32.0)


Go to Top of Page


United Kingdom
22859 Posts

Posted - 09/16/2006 :  04:29:50  Show Profile  Reply with Quote
POWER(CONVERT(bigint, 2), 32)

should do the trick.

Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 09/16/2006 :  08:20:52  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote

Note that convertion will happen only after powering the number


Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000