Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> REPOST: Re: sql to find selective duplicate rows
select first_name,mid_name,last_name,count(*)
from nametab
group by first_name,mid_name,last_name
having count(*) =1
??
"Wonderinguy" <wonderinguy_at_hotmail.com> a écrit dans le message news:
6950e82.0201241150.65aa2b00_at_posting.google.com...
> Expert !
>
> I have a table
>
> NAMETAB
> -------
>
> FIRST_NAME CHAR(20)
> MID_NAME CHAR (20)
> LAST_NAME CHAR(20)
> ....
> ...
>
>
> I rows like
>
> FIRST_NAME MID_NAME LAST_NAME
> ----------------------------------------------
> ANDY x COLLINS
> ANDY y COLLINS
> ROCHELLE a ROB
> ROCHELLE a ROB
> MIKE s TYSON
> GEORGE D CLOONEY
> GEORGE D CLOONEY
> ROBERT H HILLEN
> ROBERT J HILLEN
> ....
> ....
> I want to list rows with same FIRST_NAME and LAST_NAME but different
MID_NAME
> eg:
> ANDY x COLLINS
> ANDY y COLLINS
> ROBERT H HILLEN
> ROBERT J HILLEN
>
> can anybody please provide me with the SQL to get this result set.
>
> Thanks in advance..
This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers. Received on Thu Jan 24 2002 - 14:05:44 CST