Mikel Lindsaar wrote:
Hi all,

Doing some googling and looking through the docs, I can't find an
obvious way to do this beside post processing after the query (which I
am trying to avoid).

I'm trying to select a list of names in alphabetical order but
ignoring the whitespace.

So for example, the name "La Combe" should come after "Lace" but
before "Lacs..."

Any ideas?

Could you do it like this:

SELECT
       replace(name_column, ' ', '') AS name_replaced
FROM
       your_table_name
ORDER BY
       name_replaced

This can get a bit slowish if your table has quite a number of rows.

        Mike

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to