Re: data order problem - Mailing list pgsql-sql

From jack
Subject Re: data order problem
Date
Msg-id 001301c1e448$609a7cc0$1400a8c0@jac
Whole thread Raw
In response to Re: data order problem  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: data order problem  ("Josh Berkus" <josh@agliodbs.com>)
Re: data order problem  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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@agliodbs.com>
To: "jack" <datactrl@tpg.com.au>; <pgsql-sql@postgresql.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
>



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: data order problem
Next
From: "Dorian Taylor"
Date:
Subject: case statement in group by clause