gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] GNUmed upgrade preparation alert


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] GNUmed upgrade preparation alert
Date: Sun, 16 Oct 2011 23:14:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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

Attachment: v15-show_duplicate_regions.sql
Description: application/sql

Attachment: v15-show_duplicate_streets.sql
Description: application/sql

Attachment: v15-show_duplicate_urbs.sql
Description: application/sql


reply via email to

[Prev in Thread] Current Thread [Next in Thread]