Received: from tmg.themecca.net (alewis@themecca.net [207.252.220.51] (may be forged)) by hub.org (8.9.2/8.9.1) with ESMTP id OAA79185 for ; Sun, 18 Apr 1999 14:31:23 -0400 (EDT) (envelope-from alewis@themecca.net) Received: from localhost (alewis@localhost) by tmg.themecca.net (8.9.1/8.9.3) with ESMTP id NAA21819; Sun, 18 Apr 1999 13:31:20 -0500 Date: Sun, 18 Apr 1999 13:31:20 -0500 (CDT) From: Andy Lewis To: Gregory W Burnham cc: pgsql-sql@hub.org Subject: Re: [SQL] Case insensitive searchs In-Reply-To: <009501be89c7$91e42da0$8d0835d1@bconnected.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII The problem is that I don't know all of the city names. I was trying to do a: select distinct lower(city) from mytable This yeild a combo of all of one each of all cities that have different case and returns them in lowercase. Thanks Andy On Sun, 18 Apr 1999, Gregory W Burnham wrote: > I'm sure the syntax here is wrong, and I'm sure I'll be > corrected : ) > > But can't you do something like this: > > select distict from the_table where upper(city_name) = upper("san antonio"); > > Gregory W Burnham > Software Engineer > Excite Labs > Faculty Of Education > Simon Fraser University > Vancouver, BC, V5A 1S6 > 604 291 3615 (ph) > 604 291 5679 (fx) > > ----- Original Message ----- > From: Andy Lewis > To: > Sent: Sunday, April 18, 1999 11:14 AM > Subject: [SQL] Case insensitive searchs > > > > 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? > > > > Thanks in advance. > > > > > > > > > > >