Give a table with a lower bounds, upper bounds, and targets, I would
like to select on a value and supply the target. For example, think
about marginal tax rates:
AgiLo AgiHi Marginal
00 14600 10%
14601 59400 15%
59401 119950 25%
119951 182800 28%
182801 326450 33%
326451 infinity 35%
A straightforward approach would be
SELECT Marginal from marginalTaxRates where AGI >=AgiLo AND AGI <=
AgiHi
If I have to look up a lot of these Marginal tax rates, is there a more
efficient way to do this? (There might not be; I'm looking for
suggestions.)