Re: COPY from .csv File and Remove Duplicates

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY from .csv File and Remove Duplicates
Date: 2011-08-12 16:37:21
Message-ID: alpine.LNX.2.00.1108120936240.25454@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 12 Aug 2011, David Johnston wrote:

> Select *
> From table
> Natural Inner join (
> SELECT loc_name, sample_date, param, Count(*) as duplicate_count
> FROM table
> Group by loc_name, sample_date, param
> ) grouped
> Where duplicate_count > 1
> ;

David,

Thank you. I was close in my attempts, but not sufficiently close. This
works.

Much appreciated,

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-08-12 16:43:20 Re: Functions returning setof record -- can I use a table type as my return type hint?
Previous Message George MacKerron 2011-08-12 16:26:59 Re: Functions returning setof record -- can I use a table type as my return type hint?