Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

缺失数据 #21

Closed
relax-admin opened this issue Aug 14, 2019 · 2 comments
Closed

缺失数据 #21

relax-admin opened this issue Aug 14, 2019 · 2 comments

Comments

@relax-admin
Copy link

relax-admin commented Aug 14, 2019

county里没有county_id=441900000000的数据 (东莞市),但是在town表里存在county_id=441900000000 的数据。

原因是东莞市没有county,从第二级(city)直接到第四级(town)了

方案:是否需要插入一条数据在county?

INSERT county VALUES(1,'东莞市','441900000000','441900000000')

信息:

SELECT * FROM town a
left JOIN county b ON  a.county_id = b.county_id
WHERE b.NAME IS null

SELECT * FROM city
WHERE city_id ='441900000000'
@zhyq0826
Copy link
Member

zhyq0826 commented Aug 14, 2019

@relax-admin 这部分数据并不是缺失了,见 https://github.com/wecatch/china_regions/blob/master/src/special_city.json ,由于这些城市没有 country,直接就是 town,你可以根据自己的情况特殊处理,比如选择这类城市,直接跳到 town 去处理,见 #17

@relax-admin
Copy link
Author

@zhyq0826 ok ,明白

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants