Re: data order problem

Поиск
Список
Период
Сортировка
От jack
Тема Re: data order problem
Дата
Msg-id 001301c1e448$609a7cc0$1400a8c0@jac
обсуждение исходный текст
Ответ на Re: data order problem  ("Josh Berkus" <josh@agliodbs.com>)
Ответы Re: data order problem  ("Josh Berkus" <josh@agliodbs.com>)
Re: data order problem  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: data order problem
Следующее
От: "Dorian Taylor"
Дата:
Сообщение: case statement in group by clause