"Stoppel, Brett W" <bstoppel@ku.edu> writes:
> 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.
Only way I can think of would be to write a function to do the
stripping yourself, say 'strip_articles(text) RETURNS text' and then
in your SELECTS, do 'ORDER BY strip_articles(mycolumn)'. For
performance you might also want to create an index on that same
expression.
You could write the function in any of the available server-side
languages (pgsql, perl, tcl).
-Doug