Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP! Oracle script for identify identical records

Re: HELP! Oracle script for identify identical records

From: Richard <postmaster_at_127.0.0.1>
Date: Thu, 19 Jul 2007 14:28:00 +0000 (UTC)
Message-ID: <f7nsdg$iso$1$8300dec7@news.demon.co.uk>


ko wrote:

> I have a table which consists of n columns. I need to list those
> identical records. The coditions for identical records are column A
> and column B of those records must contain the same value and column
> C must contain 'Y'. Can someone enlighten me how to write an Oracle
> SQL script to accomplish this?
>
> Many thanks for your help.

select *
from table_name t1, table_name t2
where t1.A = t2.A

and t1.B = t2.B
and t1.C = 'Y'
and t2.C = 'Y'
and t1.rowid <> t2.rowid

-- 
Received on Thu Jul 19 2007 - 09:28:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US