Re: How to find records with the same field?

From: Michael Kleiser <mkl(at)webde-ag(dot)de>
To: Michael Kleiser <mkl(at)webde-ag(dot)de>
Cc: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to find records with the same field?
Date: 2004-07-20 11:22:20
Message-ID: 40FD006C.1060709@webde-ag.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry, iI frogot an "and" after "1.oid != t2.oid"

select t1.col1, t1.col2, t1.col3, t1.col4
from table1 as t1, table1 as t2
where
t1.oid != t2.oid AND
t1.col1 = t2.col1 and
t1.col2 = t2.col2 and
t1.col3 = t2.col3
order by t1.col4;
>
>
>
> Joost Kraaijeveld schrieb:
>
>>Thanks everyone for answering. Apparently my question was not clear enough.
>>
>>I want something like this:
>>
>>select col1, col2,col3, col4
>>from table1
>>where
>>col1 =col1 and
>>col2 = col2 and
>>col3 = col3
>>order by col4
>>
>>But if I run this query I get all the records in the table and not just the (double) ones with the same columns.
>>
>>TIA
>>
>>Joost
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephane Bortzmeyer 2004-07-20 11:44:50 Re: Postgres C functions documentation
Previous Message Michael Kleiser 2004-07-20 11:01:22 Re: How to find records with the same field?