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 1D0119DC9B2 for ; Sat, 14 Jan 2006 09:09:04 -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 66393-02 for ; Sat, 14 Jan 2006 09:09:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by postgresql.org (Postfix) with ESMTP id CBAD49DC825 for ; Sat, 14 Jan 2006 09:09:00 -0400 (AST) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis), id 0ML2ov-1Exl9T2M0p-0002FW; Sat, 14 Jan 2006 14:09:03 +0100 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1Exl9S-0001e2-00 for pgsql-sql@postgresql.org; Sat, 14 Jan 2006 14:09:02 +0100 Date: Sat, 14 Jan 2006 14:09:02 +0100 From: "A. Kretschmer" To: pgsql-sql@postgresql.org Subject: Re: Another orderby problem Message-ID: <20060114130902.GA6278@webserv.wug-glas.de> Mail-Followup-To: "A. Kretschmer" , pgsql-sql@postgresql.org References: <200601141302.49630.alan@chandlerfamily.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601141302.49630.alan@chandlerfamily.org.uk> X-DEST: 208 X-MSMail-Priority: High X-Message-Flag: Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org User-Agent: mutt-ng 1.5.9i (Linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.212 required=5 tests=[AWL=-0.182, MISSING_MIMEOLE=1.394] X-Spam-Score: 1.212 X-Spam-Level: * X-Archive-Number: 200601/69 X-Sequence-Number: 23858 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. HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===