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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with POWER(x,y)

Status
Not open for further replies.

luzippu

Programmer
Sep 2, 2003
24
GB
hi,

i can't see why the following field is not working correctly, ie: it's always coming up with 0:

((POWER((1+((((((POWER((1+(dbo_table1.APR/100)),(1/12)))-1))*12))/12)), dbo_table1.FREQUENCY)-1)*(12/dbo_table1.FREQUENCY))*100 AS YIELD

breaking the code down to a smaller formula it does work.

it looks like i can't have more calculations/references inside a POWER(x,y) function.

any comments would be appreciated.

thank you
 
Your select get alll integers, try this:
Code:
((POWER((1.0+((((((POWER((1.0+(dbo_table1.APR/100.0)),(1/12.0)))-1))*12))/12)), dbo_table1.FREQUENCY)-1.0)*(12.0/dbo_table1.FREQUENCY))*100.0 AS YIELD

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top