Re: [SQL] Case insensitive searchs

Поиск
Список
Период
Сортировка
От D'Arcy" "J.M." Cain
Тема Re: [SQL] Case insensitive searchs
Дата
Msg-id m10ZGrR-0000bHC@druid.net
обсуждение исходный текст
Ответ на Case insensitive searchs  (Andy Lewis <alewis@themecca.net>)
Список pgsql-sql
Thus spake Andy Lewis
> I have a table that has city names in it. Some of the cities have a number
> of different cases. For instance I may have:
> 
>     San Antonio
>     san antonio
>     San antonio
>     SAN ANTONIO
> 
> My question is how can I do a distinct search for all cities and only get
> one of each city?

SELECT DISTINCT UPPER (city) FROM table;

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael J Davis
Дата:
Сообщение: RE: [SQL] OUTER JOINS
Следующее
От: Guido Piazzi
Дата:
Сообщение: Re: [SQL] postgres 6.3.2 and regexp