Dynamic Decimal Point
Posted: Tue Mar 22, 2011 12:09 pm
Hi All,
I have a scenario where I get the number of decimal points dynamically.
For example:
If the incoming column value for C1 is 2 then C2 must be multipled by C2*0.01
If the incoming column value for C1 is 4 then C2 must be multipled by C2*0.0001
Basically i need to multiple C2 in this way
C2 * (1/10 ^C1 value)
Any suggestions on how to implement this logic?
-Thanks
I have a scenario where I get the number of decimal points dynamically.
For example:
If the incoming column value for C1 is 2 then C2 must be multipled by C2*0.01
If the incoming column value for C1 is 4 then C2 must be multipled by C2*0.0001
Basically i need to multiple C2 in this way
C2 * (1/10 ^C1 value)
Any suggestions on how to implement this logic?
-Thanks