Posted on 2014-03-06
I have a number in a table. I would like to build a query that will multiply that number by a decimal. The tricky part is the decimal increases based on the value of the number. There are 5 scales
Any part of the number between 0 and 315,000 Multiply by 0.000158730
Any part between 315,00 and 374,000 add the prior part and multiply remainder by 0.000423729
Any part between 374,000 and 480,000 add the prior parts and multiply remainder by 0.000471698
Any part between 480,000 and 585,000 add the prior parts and multiply remainder by 0.000714286
Any part between 585,000 and up add the prior parts and multiply remainder 0.000588235
The number will be anywhere from 0 to 1,000,000. There is only one number to do it to, not like a whole column of numbers. It just needs to be done once. Any idea how I would make this happen?