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

Home -> Community -> Usenet -> c.d.o.tools -> Re: select disinct special

Re: select disinct special

From: TurkBear <johng_at_mm.com>
Date: 2000/08/04
Message-ID: <398afea3.14737301@news>#1/1

That will work if all you want is the initial letter and not the City name....If you add the city name to the select statement it will not do want you want...

Jacek Kobusiñski <jkobusinski_at_cs.put.poznan.pl> wrote:

>Try with function substr
>
>ex.
>select distinct subst(city_name,1,1) from city_table;
>
>Kobus
>
>
>
>Stefan wrote:
>
>> 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 Fri Aug 04 2000 - 00:00:00 CDT

Original text of this message

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