Re: Selecting dupes from table

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Uros <uros(at)sir-mag(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Selecting dupes from table
Date: 2003-06-24 11:23:09
Message-ID: 20030624112308.GF19206@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 24, 2003 at 01:12:05PM +0200, Uros wrote:
> Hello Martijn,
>
> MvO> select id,url,title from directory,
> MvO> (select url from directory group by url having count(*) > 1) as list
> MvO> where list.url = directory.url;
>
> MvO> I hope I got the syntax right.
>
> I tried that before but got error:
>
> ERROR: Column reference "url" is ambiguous

Oh right, try:

select id,directory.url,title from directory,
(select url from directory group by url having count(*) > 1) as list
where list.url = directory.url;
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
> - Samuel P. Huntington

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hervé Piedvache 2003-06-24 11:27:44 Re: Selecting dupes from table
Previous Message Uros 2003-06-24 11:12:05 Re: Selecting dupes from table