Sorry if the title doesn't make sense. In this table I have a column named Item Code that is some letters like DPS and NDP that are acronyms for Device Protection Service and No Device Protection. How do I create a column that will look for all of the DPS results and return Device Protection Service next to it and do the same with the other?
I think you just want a case expression:
case
select t.*, (case code when 'DPS' then 'Device Protection Service' when 'NDP' then 'No Device Protection' end) as elaboration from t;
1.4m articles
1.4m replys
5 comments
57.0k users