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 2000 Forums
 SQL Server Development (2000)
 Power Function

Author  Topic 

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-04-19 : 01:56:07
How to find 2 power 50

I used the following
select power(2,50)
select convert(float,convert(float,power(2,50)))
select convert(decimal(38,2),convert(decimal(38,2),power(2,50)))

But there is error in all cases

Server: Msg 232, Level 16, State 3, Line 1
Arithmetic overflow error for type int, value = 1125899906842624.000000.
Any solution?


Madhivanan

Failing to plan is Planning to fail

dineshasanka
Yak Posting Veteran

72 Posts

Posted - 2005-04-19 : 02:39:55
select POWER(convert(numeric,2),Convert(numeric,50))
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-04-19 : 02:49:48
Thanks dineshasanka. Nice to see you in SQL Team

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

dineshasanka
Yak Posting Veteran

72 Posts

Posted - 2005-04-19 : 05:03:38
oh! it's you
I didn;t notice. Yeah I had registered here for long time. But today only I started to post.
Hope it will be another good time

quote:
Originally posted by dineshasanka

select POWER(convert(numeric,2),Convert(numeric,50))

Go to Top of Page
   

- Advertisement -