July 2, 2014

SQL Case statement

select  
pos_num as "Position number",
case
        when status = 1 then 'Active'
        when status = 2 then 'Inactive'
        else 'Unknown'
end as "Status"
from dim_position

No comments:

Post a Comment