I have a column in SQL that has multiple “Definitions” but I would like anything that starts with DEF to just be the generic “Definition”.
What can I put in my Select statement to have this converted?
Advertisement
Answer
You can use case
:
select (case when current_output like 'DEF%' then 'DEFINITION' else current_output end) as desired_output