I ran this query 2 or 3 times. When I open the table, all degree column data is now null. How can I modify this so if degree doesn't meet any of the when condition then it doesn't get changed. thanks.
SET degree =
when (degree='M.D.') then 'MD'
when (degree in('B.Sc.', 'B.S.', 'B.S', 'BS(High Honors)', 'BS/MS', 'B.sc.', 'BSc')) then 'BS'
when (degree IN('Ph. D.', 'Ph D', 'Ph.D.')) then 'PhD.'
when (degree IN('M.S.', 'Masters', 'M. Sci.')) then 'MS'
when degree='DMD' then 'DDM'
when degree ='Psy.D' then 'DPSY'
when degree in('B.A', 'B.A.') then 'BA'
when degree='B.M.S.' then 'BMS'
when degree='D.O.' then 'DO'
when degree='DNSC' then 'DSN'
when degree='M.A.' then 'MA'
when degree='M.B.B.S' then 'MD'
when degree='MS.B' then 'MSB'
when degree='P.A.' then 'PA'
when degree='MSN BS' then 'MSN'