Received: from mail2.uniserve.com (mail2.uniserve.com [204.244.156.10]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43I9UA36671 for ; Thu, 3 May 2001 14:09:30 -0400 (EDT) (envelope-from gutz@kalador.com) Received: from van12d25.dial.uniserve.ca ([204.244.161.88] helo=gutz) by mail2.uniserve.com with smtp (Exim 3.13 #1) id 14vNXb-000OSj-00; Thu, 03 May 2001 11:09:28 -0700 From: "Gerald Gutierrez" To: "Jeff MacDonald" , Subject: RE: "correct" sorting. Date: Thu, 3 May 2001 11:16:25 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal In-Reply-To: X-Archive-Number: 200105/16 X-Sequence-Number: 2814 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 ------ 1 10 1a 1b 2 20 2a 2b 3 30 3a 3b (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)