Re: [GENERAL] Alphabetical sorting...

Поиск
Список
Период
Сортировка
От Paul Mullen
Тема Re: [GENERAL] Alphabetical sorting...
Дата
Msg-id 199807062044.QAA05502@thecore.com
обсуждение исходный текст
Ответ на Alphabetical sorting...  (Chris Johnson <cmj@inline-design.com>)
Ответы Re: [GENERAL] Alphabetical sorting...  (Chris Johnson <cmj@inline-design.com>)
Список pgsql-general
Chris,

a and A are have different acsii codes

try:

select test from test order by lower(test)

This should give you what you want.

- Paul

> HELP!
>
> Alphabetical sorting... is it broken or is this intentional.  If this is
> not a "feature" anyone have any idea of how to actually sort
> alphabetically on a text field?
>
> cmj=> create table test (test text);
> CREATE
> cmj=> insert into test values ('a');
> INSERT 240009 1
> cmj=> insert into test values ('A');
> INSERT 240010 1
> cmj=> insert into test values ('ABLE');
> INSERT 240011 1
> cmj=> insert into test values ('Able');
> INSERT 240012 1
> cmj=> insert into test values ('AXIOM');
> INSERT 240013 1
> select * from test order by test;
> test
> -----
> A
> ABLE
> AXIOM
> Able
> a
> (5 rows)
>
>
> Thanks!
> Chris
>
>
>
>


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

Предыдущее
От: David Gilbert
Дата:
Сообщение: I'll use the index when I'm good and ready!
Следующее
От: James Olin Oden
Дата:
Сообщение: Re: [GENERAL] Varchar and varchar2