23 de setembro de 2009 às 3:31 pm
#89853
![Avatar photo](https://www.profissionaloracle.com.br/wp-content/uploads/2012/06/litz-80x80.jpg)
Participante
Veja se é isso que vc imagina:
select case when (COD_UF = ‘SP’ and CD_CIDADE = ‘EM2’ and (DE_CEP between 10 and 59 or DE_CEP between 80 and 84)) then
‘SP Capital’
when (COD_UF = ‘SP’ and CD_CIDADE = ‘EM2’ and (DE_CEP between 60 and 79 or DE_CEP between 85 and 99)) then
‘SP Interior’
else
‘Outros’
end
from CEP3
Vlw Leonardo Litz