Re: [Gnumed-devel] GNUmed upgrade preparation alert
Karsten Hilbert <[email protected]> Sun, 16 Oct 2011 23:14:05 +0200
| Newsgroups | gmane.comp.gnu.medical.announce |
|---|---|
| Message-ID | <20111016211405.GB6273__15731.8086749457$1318799661$gmane$org@hermes.hilbert.loc> |
On Thu, Oct 13, 2011 at 04:37:15PM +0200, Karsten Hilbert wrote: > To look for duplicates run these queries: > > Regions: > > SELECT * from dem.state where id not in ( > select max(s.id) from dem.state s group by lower(s.name), s.code, s.country > ); > > Communities: > > SELECT * from dem.urb where id not in ( > select max(u.id) from dem.urb u group by lower(u.name), lower(u.postcode), u.id_state > ); > > Streets: > > SELECT * from dem.street where id not in ( > select max(st.id) from dem.street group by lower(st.name), lower(st.postcode), st.id_urb > ); > > Then deduplicate until no more rows are returned. I have added SQL scripts containing the above queries to server/sql/v14-v15/fixups/ directory such that they will be included with the next release. For your convenience I am attaching those scripts here. Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 _______________________________________________ Gnumed-announce mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnumed-announce
v15-show_duplicate_regions.sql
(application/x-sql, 339 B) - not displayed
v15-show_duplicate_streets.sql
(application/x-sql, 343 B) - not displayed
v15-show_duplicate_urbs.sql
(application/x-sql, 367 B) - not displayed