having trouble with "^"

  • This is my stored procedure but it is not working because of the "^". Is there a trick?
     
    (dbo.User_CIS.Installment_Total_Fee * (1 + (0.16 / dbo.User_CIS.Length_Installment))^(dbo.User_CIS.Length_Installment*1))
  • if you need ^ as in 2^5 = 32

    then look up the function power

    select power(2,5) = 32

  • ok, here is how I have changed the code but I am still getting error messages

    <code>

    (dbo.User_CIS.Installment_Total_Fee *

    select power((1 + (0.16 / dbo.User_CIS.Length_Installment),(dbo.User_CIS.Length_Installment*1))

    </code>

  • (dbo.User_CIS.Installment_Total_Fee * power(1 + (0.16 / dbo.User_CIS.Length_Installment),(dbo.User_CIS.Length_Installment*1)))

    It looked like you parenthesis were a bit off and you did not need the select.  Why are you multiplying Lenght_Installment by one? 

    I wasn't born stupid - I had to study.

  • Try:

    SELECT dbo.User_CIS.Installment_Total_Fee

           *

           Power(1 + (0.16 / dbo.User_CIS.Length_Installment), dbo.User_CIS.Length_Installment)

      FROM dbo.User_CIS

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply