日期:2014-05-18 浏览次数:20555 次
select *, case when Province='江苏省' then '华东' when Province='浙江省' then '华东' when CityName='上海市' then '华东' when Province='河南省' then '华中' when Province='湖北省' then '华中' when Province='湖南省' then '华中' when Province='广西省' then '华南' when Province='广东省' then '华南' when Province='河北省' then '华北' when CityName='北京市' then '华北' when CityName='天津市' then '华北' else '其他' end as 'District' from cityTable
select * from ( select *, case when Province='江苏省' then '华东' when Province='浙江省' then '华东' when CityName='上海市' then '华东' when Province='河南省' then '华中' when Province='湖北省' then '华中' when Province='湖南省' then '华中' when Province='广西省' then '华南' when Province='广东省' then '华南' when Province='河北省' then '华北' when CityName='北京市' then '华北' when CityName='天津市' then '华北' else '其他' end as 'District' from cityTable ) where District='华东'