December 10, 2011 at 5:37 am
Hi all,
I am working on Loan & EMI Interface...
I need a help n how to divide Decimal Value by ^ value(XOR )
For Example
SELECT (1+ ((1.02/100))/12)) ^ 11
In Stored Procedure
DECLARE @ldc_interet_rate_1 DECIMAL(20,6)
DECLARE @ldc_interest_rate DECIMAL(20,6)
SELECT @ldc_interet_rate_1 = (( 1 + (@ldc_interest_rate/100)))^11
Please help me on this task
Thanks in Advance
Regards
Farooq.S
December 10, 2011 at 5:37 pm
"^" means "Bitwise OR" in SQL and not an XOR. In most other things, it means "raised to a power". The formula you have appears to be an interest formula for 11 time periods and I'm very confused as to what you might possibly mean by "divide Decimal Value by ^ value(XOR )".
--Jeff Moden
Change is inevitable... Change for the better is not.
December 11, 2011 at 10:22 pm
Sorry Jeff....
For simple Understanding i vl give an example..Please hel;p me out
Ex:
how to calculate power vale in the Sql server
Select 10 power of 2= 100
(10)^2 = 100
December 11, 2011 at 10:25 pm
Mr.Jeff
It should Multiply with 'n' number to the value
if 10 power 2 = 10 * 10 =100
if 10 power 5 = 10 * 10 * 10 * 10 * 10 = 100000
December 12, 2011 at 12:44 pm
POWER(10,2) = 100
December 13, 2011 at 5:54 am
G-472796 is correct. You're probably looking for the POWER function. Just keep in mind that POWER returns the same datatype as the first operand. For example, trying to take the square root of 3 with an Integer for the first operand will return a 1 instead of the expected answer.
SELECT POWER(3,0.50000000)
There's also more than one way to skin a cat. The following engineering notation is read as "1 times 10 raised to the power of 2".
SELECT 1E2
Of course, that notation won't take variables.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply