Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id AC5C3476901 for ; Mon, 15 Apr 2002 11:46:42 -0400 (EDT) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1370650; Mon, 15 Apr 2002 08:46:46 -0700 From: "Josh Berkus" Subject: Re: data order problem To: "jack" , , "Josh Berkus" X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Mon, 15 Apr 2002 08:46:46 -0700 Message-ID: In-Reply-To: <001301c1e448$609a7cc0$1400a8c0@jac> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200204/188 X-Sequence-Number: 7452 Jack, > 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' It is. I'm afraid that you compiled your database with some kind of non-standard sort order, possibly due to the OS you are using. I can't help you with this; I'm just a SQL junkie. Good luck! -Josh