Convert a value based on range
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-04-12T16:00:37Z
Indexed on
2010/04/12
16:03 UTC
Read the original article
Hit count: 318
I need to convert a number to another value based on a range:
ie:
7 = "A" 106 = "I"
I have a range like this:
from to return-val 1 17 A 17 35 B 35 38 C 38 56 D 56 72 E 72 88 F 88 98 G 98 104 H 104 115 I 115 120 J 120 123 K 123 129 L 129 infinity M
The values are fixed and do not change.
I was thinking a lookup table would be required, but is there a way it could be done with a function on an analytics function inside of oracle?
© Stack Overflow or respective owner