Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Silly Problem - Arithmetic Operators (powers) in User Defined Function 1

Status
Not open for further replies.

AccessUser22

Technical User
Jan 23, 2003
168
US
Hi,

I'm trying to create a function that raises a number to a power of 2. So like 6 squared is 36. However for some reason when I run it it gives me 4 as an answer. This is the syntax I have for the actual computation

SET @Result = (@Variable ^ 2)

Even when I remove @Variable and replace it with a 6 I'm getting 4 as an answer. Where am I going wrong? I know it's probably something silly. I've been playing around with it for a while now. Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top