Received: from druid.net (root@druid.net [198.96.119.226]) by hub.org (8.9.3/8.9.1) with ESMTP id MAA10903 for ; Mon, 19 Apr 1999 12:25:35 -0400 (EDT) (envelope-from darcy@druid.net) Received: from localhost (1130 bytes) by druid.net via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) (ident using unix) id for ; Mon, 19 Apr 1999 12:25:29 -0400 (EDT) (Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13) Message-Id: Subject: Re: [SQL] Case insensitive searchs In-Reply-To: from Andy Lewis at "Apr 18, 1999 01:14:46 pm" To: alewis@themecca.net (Andy Lewis) Date: Mon, 19 Apr 1999 12:25:29 -0400 (EDT) From: "D'Arcy" "J.M." Cain Cc: pgsql-sql@hub.org X-Mailer: ELM [version 2.4ME+ PL50 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 | 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.