Is there a way to use SELECT to reassign the value of a column so it
displays differently?
For instance, I have a column called status. It is an integer value
in the database (i.e. valid values are 1, 2, 3, 4). I want to display
them for what them mean (i.e. 1 = NORMAL, 2 = DEGRADED, 3 = ERROR, 4 =
DEAD). So I want to display them for the name or maybe an initial (N
= normal).
So if my table looks like this
TABLE1
--------------
NAME STATUS
---------- ------------
ROW1 2
ROW2 3
ROW3 1
ROW4 1
ROW5 4
I would like to see it as
TABLE1
--------------
NAME STATUS
---------- ------------
ROW1 DEGRADED
ROW2 ERROR
ROW3 NORMAL
ROW4 NORMAL
ROW5 DEAD
Is there a way to do this?
displays differently?
For instance, I have a column called status. It is an integer value
in the database (i.e. valid values are 1, 2, 3, 4). I want to display
them for what them mean (i.e. 1 = NORMAL, 2 = DEGRADED, 3 = ERROR, 4 =
DEAD). So I want to display them for the name or maybe an initial (N
= normal).
So if my table looks like this
TABLE1
--------------
NAME STATUS
---------- ------------
ROW1 2
ROW2 3
ROW3 1
ROW4 1
ROW5 4
I would like to see it as
TABLE1
--------------
NAME STATUS
---------- ------------
ROW1 DEGRADED
ROW2 ERROR
ROW3 NORMAL
ROW4 NORMAL
ROW5 DEAD
Is there a way to do this?
Comment