Created
October 5, 2015 15:28
-
-
Save plablo09/7a00481727502b3b991b to your computer and use it in GitHub Desktop.
procesamiento del denue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Crear columnas para las categorías generals y tipo de actividades (primarias, secundarias, terciarias y de gobierno): | |
select gid, substring(clase_act from 0 for 3) as sector, | |
case when substring(clase_act from 0 for 3) like '11' | |
then ('prmario') | |
when substring(clase_act from 0 for 3) in ('21','22','23','31','32','33') | |
then ('secundario') | |
when substring(clase_act from 0 for 3) in ('43','46','48','49','51','52','53','54','55','56','61','62','71','72','81') | |
then 'terciario' | |
when substring(clase_act from 0 for 3) like '93' | |
then 'gobierno' | |
else ('nd') | |
end as tipo, | |
desc_act, | |
geom | |
from denue | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment