Re: [SQL] Case insensitive searchs - Mailing list pgsql-sql

From D'Arcy" "J.M." Cain
Subject Re: [SQL] Case insensitive searchs
Date
Msg-id m10ZGrR-0000bHC@druid.net
Whole thread Raw
In response to Case insensitive searchs  (Andy Lewis <alewis@themecca.net>)
List 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 by date:

Previous
From: Michael J Davis
Date:
Subject: RE: [SQL] OUTER JOINS
Next
From: Guido Piazzi
Date:
Subject: Re: [SQL] postgres 6.3.2 and regexp