Alphanumeric natural order sorting

From: "Umashanker, Srividhya" <srividhya(dot)umashanker(at)hp(dot)com>
To: "pgeu-general(at)postgresql(dot)org" <pgeu-general(at)postgresql(dot)org>
Subject: Alphanumeric natural order sorting
Date: 2013-03-20 06:34:05
Message-ID: 5D5078F9198B04449B9D74EA9E7F3D580CD24627@G1W3640.americas.hpqcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgeu-general pgsql-general

All,

I am looking for a solution the Alphanumeric sorting
I tried all possible collation example -- select * from test order by name collate "en_US";

Is there someone who has solved this problem with writing a function?

Below are more details -

Database
[cid:image001(dot)png(at)01CE2562(dot)96C9E6C0]

Table
[cid:image002(dot)png(at)01CE2562(dot)96C9E6C0]

Rows with orderby
[cid:image004(dot)png(at)01CE2563(dot)02AA5370]

I am expecting

1, bay1
2, bay2
10, bay10
11, bay11

-vidhya

Responses

Browse pgeu-general by date

  From Date Subject
Next Message Umashanker, Srividhya 2013-03-20 06:44:59 Case insensitve sort
Previous Message Albe Laurenz 2013-03-04 10:50:25 Re: Ubuntu upgrade, 10.04 to 12.04, postgres 8.4.7 to 8.4.11

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2013-03-20 08:13:17 Re: Alphanumeric natural order sorting
Previous Message ylu123 2013-03-20 02:33:51 Npgsql Integrated Authentication Problem