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

Home -> Community -> Usenet -> c.d.o.server -> Re: Similar Rows...

Re: Similar Rows...

From: Stephan Langer <slanger_at_dixi-wc.de>
Date: Thu, 02 Nov 2000 16:25:40 +0100
Message-ID: <3A018774.2A5B8B6A@dixi-wc.de>

hi

spool c:\filename (or whatever you want)

select code, count(*) from table_name group by code having count(*) > 1

hth
SL

Florent schrieb:

> Hi,
> I don't know if this has been asked, (sorry if it has ),but I need to
> find 2(or more) rows that are similar,
> so if I have
> NAME / CODE
> A 0
> B 0
> C 1
>
> and NAME is my primary key, what script can I use to tell that A and B
> are similar based on CODE,
> If I do SELECT * FROM MY_TABLE WHERE CODE = 0; that 's would give me A
> and B but what if I don't know what code is, I need a script that would
> tell me A and B because CODE is the same regardless of the value.
>
> And last but not least, how do I send the result to a file in SQLPlus.
>
> Thanks in advance
> Florent
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
  Received on Thu Nov 02 2000 - 09:25:40 CST

Original text of this message

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