RE: "correct" sorting.

Поиск
Список
Период
Сортировка
От Gerald Gutierrez
Тема RE: "correct" sorting.
Дата
Msg-id IIEOKIIOJMELMIFMMEBFEEMGCCAA.gutz@kalador.com
обсуждение исходный текст
Ответ на "correct" sorting.  (Jeff MacDonald <jeff@tht.net>)
Ответы RE: "correct" sorting.
Список pgsql-sql

That list looks like an ordering that is custom to your application. The
latter sort created by the SQL seems more typical (correct?) to me.

I would return the table unsorted, and write the sorting routine in the
calling code instead.


-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Jeff MacDonald
Sent: Wednesday, May 02, 2001 9:41 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] "correct" sorting.


Hi folks,

say i have a text field with teh values

1,2,3,10,20,30,1a,1b,2a,2b

and i want to sort it so i get,

1
1a
1b
2
2a
2b
3
10
20
30

is there anyway to do that with postgresql ?
below is what actually happens.

jeff=> select * from foo order by var1;var1
------1101a1b2202a2b3303a3b
(12 rows)


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command   (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)



В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: '13 months ago'::reltime
Следующее
От: Joel Burton
Дата:
Сообщение: RE: "correct" sorting.