Not my original db, data or procedure as I have been tasked with developing an updated infosys (to a .NET app and SQLServer db). Anyway, the original app/db has a rounding specification that is a bit strange to me and need some input on how I should
proceed. The original system architects decided they'd perform a round down on a particular field (int) which is ultimately used in a fee calculation.
Not a big deal because I could just issue a ROUND(theField, -2) --- But I found a problem. At first glance it seemed that they wanted to round to the 10th:
3143 would round to 3100 with ROUND(3143, -2)
But if I come across a value such as 4075 this would then round to 4100 with ROUND(4075, -2) WHEN THEY WANT THIS TO BE 4000. That is, to arrive at 4000, then I'd need to issue a different ROUND(4075, -3)
Does this make sense?
How should I approach this?
Is this a proceedure/logic probelm or am I looking at this with too limited vision in what needs to be done (SQL-wise)?
Thanks for your input,
James Crandall ~ http://javitechnologies.com Spatial Database Solutions
View Complete Post