Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Operand data type float is invalid for '^' operator

I am searching for the Float type limitation but I can't find any post for ^ operand.

I have a little mathematical phrase:

((@IntVar*((@FloatVar*1)/1200))*((1+((@FloatVar*1)/1200))^@IntValr))/(((1+((@FloatVar*1)/1200))^@IntVar)-1);

and SQL raises the error:

The data types float and int are incompatible in the ^ operator.

after that, I changed the variable type and new formula is it:

((@IntVar*((@FloatVar*1)/1200))*((1+((@FloatVar*1)/1200))^@FloatValr))/(((1+((@FloatVar*1)/1200))^@FloatVar)-1);

But SQL raises error again:

Operand data type float is invalid for ^ operator.

My first ask is, how to solve this error?
and after that, anybody knows limitation of operands on a float or decimal types?

like image 613
Ali.azimi Avatar asked Sep 18 '25 17:09

Ali.azimi


1 Answers

if you want use exponant function you must use power SQL SERVER function.

look here

like image 200
Esperento57 Avatar answered Sep 21 '25 08:09

Esperento57