Git Product home page Git Product logo

Comments (2)

ppKrauss avatar ppKrauss commented on May 28, 2024

FEITO:

create table newcep(ibge text, lexlabel text, ceps text);
insert into newcep VALUES
 ('2928505','santa.teresinha','44590-000 a 44599-999')
,('5203500','bom.jesus.goias','75570-000 a 75579-999')
,('2104552','governador.edison.lobao','65928-000 a 65928-999')
 ('2110278','santo.amaro.maranhao','65195-000 a 65199-999')
,('2111763','senador.la.rocque','65935-000 a 65935-499')
,('3108909','brazopolis','37530-000 a 37539-999')
,('3122900','dona.eusebia','36784-000 a 36787-999')
,('1506500','santa.izabel.para','68790-000 a 68794-999')
,('2513968','sao.domingos','58853-000 a 58854-999')
,('2606903','iguaracy','56840-000 a 56849-999')
,('3303807','paraty','23970-000 a 23999-999')
,('3305901','trajano.moraes','28750-000 a 28769-999')
,('2401206','ares','59170-000 a 59172-999')
,('2405306','boa.saude','59260-000 a 59269-999')
,('2401305','campo.grande','59680-000 a 59684-999')
,('1100098','espigao.d.oeste','76974-000 a 76975-999')
,('4317103','sant.ana.livramento','97570-001 a 97589-999')
,('2802601','gracho.cardoso','49860-000 a 49869-999')
,('3550001','sao.luis.paraitinga','12140-000 a 12169-999')
,('1720499','sao.valerio.natividade','77390-000 a 77394-999');

-- test -- select c.name, concat('[',replace(n.ceps,' a ',' '),']') as cep_range from citybr c inner join newcep n ON n.ibge=c."idIBGE" AND c."lexLabel"=n.lexlabel;

UPDATE citybr 
SET "postalCode_ranges" = concat('[',replace(t.ceps,' a ',' '),']')  
FROM newcep t
WHERE citybr."postalCode_ranges" IS NULL AND t.ibge=citybr."idIBGE" ;

from city-codes.

ppKrauss avatar ppKrauss commented on May 28, 2024

Pela planilha também detectamos os seguintes sinônimos a serem tratados:

nome Sinônimo-CEP UF WdID
Bom Jesus de Goiás Bom Jesus GO Q891725
Dona Eusébia Dona Euzébia MG Q1756805
Espigão D'Oeste Espigão do Oeste RO Q616498
Gracho Cardoso Graccho Cardoso SE Q647366
Iguaracy Iguaraci PE Q2010845
Sant'Ana do Livramento Santana do Livramento RS Q917693

from city-codes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.