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)
 getting 2^32

Author  Topic 

pkurlawala
Starting Member

1 Post

Posted - 2009-02-10 : 02:09:28
how you u write a tsql code for the value of 2 raised to the 32nd power?

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-02-10 : 02:15:17
Try this once

DECLARE @value bigint, @counter bigint
SET @value = 2
SET @counter = 32

SELECT POWER(@value, @counter)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-10 : 02:15:45
[code]SELECT POWER(CAST(2 AS bigint),32)[/code]
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-02-10 : 02:24:49
SELECT POWER(2E, 32E)


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

- Advertisement -