From: | "jack" <datactrl(at)tpg(dot)com(dot)au> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org>, "Josh Berkus" <josh(at)agliodbs(dot)com> |
Subject: | Re: data order problem |
Date: | 2002-04-15 06:40:03 |
Message-ID: | 001301c1e448$609a7cc0$1400a8c0@jac |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice pgsql-sql |
Hi, Jose
Suppose '_' stands for a space character. The one column table,xxx, contains
following data.
column name is suburb and is set as primary key.
'THE_AAA'
'THE_BBB'
'THE_CDD'
'THECCC'
After I do
"SELECT * FROM xxx ORDER BY suburb;"
I've got this.
'THE_AAA'
'THE_BBB'
'THECCC'
'THE_CDD'
But I expect it should be like ...
'THE_AAA'
'THE_BBB'
'THE_CDD'
'THECCC'
Because, according to ascii code, space character should be smaller than 'C'
----- Original Message -----
From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "jack" <datactrl(at)tpg(dot)com(dot)au>; <pgsql-sql(at)postgresql(dot)org>
Sent: Monday, April 15, 2002 2:53 PM
Subject: Re: [SQL] data order problem
> Jack,
>
> > why is it not ordered by ASCII sequence. And I found if I put in a
> > data such
> > as '<ABC>', it goes to last one when you do the same query.
>
> I'm sorry, you're going to have to be more explicit. I don't
> understand what problem you are having with the order given.
>
> -Josh Berkus
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pierre-Alexis Paquin | 2002-04-15 08:07:07 | Postgresql starts but nothing 's happened |
Previous Message | Tom Lane | 2002-04-15 04:55:56 | Re: data order problem |
From | Date | Subject | |
---|---|---|---|
Next Message | Dorian Taylor | 2002-04-15 10:44:05 | case statement in group by clause |
Previous Message | Tom Lane | 2002-04-15 04:55:56 | Re: data order problem |