X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 896359DC9DA for ; Sat, 14 Jan 2006 10:27:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80528-03 for ; Sat, 14 Jan 2006 10:27:52 -0400 (AST) X-Greylist: delayed 01:25:09.593808 by SQLgrey- Received: from home.chandlerfamily.org.uk (82-44-22-127.cable.ubr06.croy.blueyonder.co.uk [82.44.22.127]) by postgresql.org (Postfix) with ESMTP id CB6339DC997 for ; Sat, 14 Jan 2006 10:27:46 -0400 (AST) Received: from kanger.home ([192.168.0.21]) by home.chandlerfamily.org.uk with esmtp (Exim 4.50) id 1ExmNj-0003jC-1q for pgsql-sql@postgresql.org; Sat, 14 Jan 2006 14:27:51 +0000 From: Alan Chandler To: pgsql-sql@postgresql.org Subject: Re: Another orderby problem Date: Sat, 14 Jan 2006 14:28:00 +0000 User-Agent: KMail/1.9.1 References: <200601141302.49630.alan@chandlerfamily.org.uk> <20060114130902.GA6278@webserv.wug-glas.de> In-Reply-To: <20060114130902.GA6278@webserv.wug-glas.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601141428.00319.alan@chandlerfamily.org.uk> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.976 required=5 tests=[AWL=-0.737, RCVD_IN_NJABL_DUL=1.713] X-Spam-Score: 0.976 X-Spam-Level: X-Archive-Number: 200601/71 X-Sequence-Number: 23860 On Saturday 14 January 2006 13:09, A. Kretschmer wrote: > am 14.01.2006, um 13:02:48 +0000 mailte Alan Chandler folgendes: > > select name, id, transaction.date as tdate, description, amount > > from account join transaction on name=dst where name ='Sarah' > > order by tdate asc; > > > > name | id | tdate | description | amount > > -------+----+------------+---------------------------+-------- > > Sarah | 12 | 0005-06-05 | Ben 21st Birthday Pressie | 41 > > Sarah | 13 | 0005-06-05 | Cash from Mum | 60 > > Sarah | 14 | 0005-06-08 | Petrol | 27.33 > > Sarah | 15 | 0005-06-10 | Petrol Allowance | -40 > > Sarah | 11 | 2005-06-05 | Sarah Petrol | 27.74 > > (5 rows) > > > > I can't figure out why the dates are not in order (see transaction 11 is > > out of place). > > '0005-06-10' < '2005-06-05'. Perhaps you have a wrong year. Thanks Its amazing how long you can stare at something and not see the obvious. -- Alan Chandler http://www.chandlerfamily.org.uk Open Source. It's the difference between trust and antitrust.