Re: [SQL] Case insensitive searchs

Поиск
Список
Период
Сортировка
От Andy Lewis
Тема Re: [SQL] Case insensitive searchs
Дата
Msg-id Pine.LNX.4.05.9904181328250.21774-100000@tmg.themecca.net
обсуждение исходный текст
Ответ на Re: [SQL] Case insensitive searchs  ("Gregory W Burnham" <gburnham@sfu.ca>)
Ответы Re: [SQL] Case insensitive searchs  (reedstrm@wallace.ece.rice.edu (Ross J. Reedstrom))
Список pgsql-sql
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 <alewis@themecca.net>
> To: <pgsql-sql@hub.org>
> 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.
> >
> >
> >
> >
> >
> 



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

Предыдущее
От: "Gregory W Burnham"
Дата:
Сообщение: Re: [SQL] Case insensitive searchs
Следующее
От: reedstrm@wallace.ece.rice.edu (Ross J. Reedstrom)
Дата:
Сообщение: Re: [SQL] Case insensitive searchs