Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: select disinct special
Hi Stefan
you can use a request like that :
select name
from cities
where rowid not in (
select rowid from cities
minus
select min(rowid) from cities
group by substr(name,1,1)
)
order by name
/
if you don't matter the order, do not keep 'order by name'
For this list :
NOM
NOM
Stefan a écrit :
> Hi,
>
> got table like
>
> CITY
>
> Dallas
> Detroit
> ...
> New York
> Nagasaki
> ...
> Washington
> ...
>
> how to get only one city of each letter ?
>
> i just wanna get back
>
> D ( or any city with starting 'D' , but only ONE city)
> N ...
> W ...
>
> any ideas out there ?
> thanx
Received on Mon Aug 07 2000 - 00:00:00 CDT
![]() |
![]() |