Colegas, boa tarde.
Tenho uma TABELA COM UMA COLUNA1 COD_MES com os numeros referentes aos meses, 1,2,3 ... 12. preciso colocar na COLUNA2 MES os nomes desses meses.
Tabela Como está
COD_MES MES
1
2
3
Tentei essa query mas não tive sucesso.
UPDATE [dbo].TABELA
SET
MES =
case COD_MES WHEN 1 then 'JAN' when 2 then 'FEV' when 3 then 'MAR'
when 4 then 'ABR' when 5 then 'MAI' when 6 then 'JUN'
when 7 then 'JUL' when 8 then 'AGO' when 9 then 'SET'
when 10 then 'OUT' when 11 then 'NOV' when 12 then 'DEZ'
else 14 end
Obrigado!