Re: Select statement question

Поиск
Список
Период
Сортировка
От Doug Silver
Тема Re: Select statement question
Дата
Msg-id Pine.LNX.4.21.0203021450330.24487-100000@danzig.sd.quantified.net
обсуждение исходный текст
Ответ на Select statement question  ("ebp" <ebp_register@yahoo.com>)
Список pgsql-novice
On Sat, 2 Mar 2002, ebp wrote:

> Im trying to select only the first names from a table that begin with an A.
> I tryed this:
> select fname,lname,subscriber_id from kbeg where fname='A*'||'a*'
> and no rows shows up, im positive that there are atleast 1,000 rows with fname starting with A.
> Any suggestions?
>
>

How about something like this

select fname,lname,subscriber_id from kbeg where fname~*'^a';

~ is for regular expression, * is case insensitive, and ^ means at the
beginning of fname.

Look at Chapter 4.10 in Bruce Momjian's "PostgreSQL" for more examples.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Doug Silver
Network Manager
Quantified Systems, Inc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Предыдущее
От: Salvatore Sferrazza
Дата:
Сообщение: Re: ERD or UML tool
Следующее
От: daq
Дата:
Сообщение: Re: select statement...