Re: ORDER BY and ignoring the , a , and an

Поиск
Список
Период
Сортировка
От Gregory Wood
Тема Re: ORDER BY and ignoring the , a , and an
Дата
Msg-id 003601c0b88b$294bc3d0$7889ffcc@comstock.com
обсуждение исходный текст
Ответ на ORDER BY and ignoring the , a , and an  ("Stoppel, Brett W" <bstoppel@ku.edu>)
Список pgsql-general
> Is it possible to have the ORDER BY option ignore the articles "the ", "a
",
> and "an " at the beginning of a VARCHAR, CHAR, TEXT, et cetera field? In
> other words, I want my results to come back alphabetized, while ignoring
the
> aforementioned articles.

I suppose you could write a function (say strip_articles) to strip those
words out (and anything else you'd like), then do an ORDER BY
strip_articles(MyField).

Greg


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: missing data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: missing data