Can any of you please advice me as to how I am going to accomplish certain mathematical functions on numbers such as working out the n-th root of a number since the mathematical functions built in don't go past the square root (2nd root)?
Regards
<!--[if !msEquation]--> <!--[if !vml]--> <![endif]--><!--[if !vml]--><!--[endif]--><!--[endif]-->hi,
you can use the POWER function since the equivalent exponential function of an [n'th root of x] is [x power of 1/n]..
e.g.
if you want to get the 5th root of 100, use POWER(100, 1.0/5.0)
- clintz|||Thank you very much clintz.
|||you can also create user defined function (UDF) for other mathematical functions that you need.. like factorial, permutations, etc.|||It seems i have rejoiced to early:
if i do a simple query like select power(27,1/3),
the resulting value is 1 not 3. why is that?
Regards
|||
bcs 1/3 = 0 (INTEGER DIVISION)
So anything power 0 = 1
To overcome this use the following expression
Select Power(27.0,1.0/3.0)
|||lol of course, thanks so much once againRegards
No comments:
Post a Comment