Skip site navigation (1) Skip section navigation (2)

Re: removing duplicate entries in a <JOIN> statement

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: kvnsmnsn(at)cs(dot)byu(dot)edu
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: removing duplicate entries in a <JOIN> statement
Date: 2007-04-27 19:54:30
Message-ID: 20070427195430.GA18534@wolff.to (view raw or flat)
Thread:
Lists: pgsql-novice
On Fri, Apr 27, 2007 at 09:18:59 -0600,
  kvnsmnsn(at)cs(dot)byu(dot)edu wrote:
> 
> The problem with this is that <def> has some duplicate entries, seve-
> ral occurrences of a row that has precisely the same column values as
> some other row in <def>, so I'm getting duplicate rows in table
> <output_table>.
> 
> This solves my problem, but it seems to take an enormous amount of
> time to execute.  Is this the best way to remove duplicate entries, or
> is there some other way?

You could try left joining abc with a subselect of abc obtained using IN.

In response to

pgsql-novice by date

Next:From: Fei LiuDate: 2007-04-27 20:03:19
Subject: database design question, new to postgresql
Previous:From: kvnsmnsnDate: 2007-04-27 16:10:38
Subject: including limited lines depending on input parameter

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group