ORDER BY a string

From: phazon <phazon(dot)ml(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ORDER BY a string
Date: 2007-11-06 16:09:08
Message-ID: 94ffdc2e0711060809y7ec6a700jed0f63649eb0a24c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I've to order by q query by a column.

SELECT a.id, a.nom
FROM table a
ORDER BY a.nom;

And i've something strange. It's order like that:

5 | aaaa
8 | aaab
15 | ** aaac
6 | aaad

I've "**" before the name in order to display them at first, but the 2
chars "**" are ignored in the order by.

Can anyone explain me why ?

PS: Sorry for my bad english, i'm french.

--
phazon

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-11-06 16:18:39 Re: ORDER BY a string
Previous Message Tom Lane 2007-11-06 15:54:12 Re: How to find non-unique indexes in system tables