Hey all,
I have a table with authority levels, 0, 100, 200, 300, etc. and I have a query which is being sent an user authority level such as 189. What I need to figure out is how can I pull the highest value under the supplied value.
For example:
User Authority Level = 190
Table entries:
10
100
150
190
210
350
Desired return:
190
I need to return the highest value that is still under the range, so for this case I need to return 190. I need the return set to be one line, so I can't return 190 and all the entries below it.
Is this possible in SQL?
THANKS in advance!
Tags: