Received: from farout.palaver.net (farout.palaver.net [208.15.176.1]) by hub.org (8.9.3/8.9.3) with ESMTP id TAA65335 for ; Tue, 6 Jul 1999 19:42:23 -0400 (EDT) (envelope-from bobd@palaver.net) Received: from palaver.net (farout.palaver.net [208.15.176.1]) by farout.palaver.net (8.9.3/8.9.1) with ESMTP id SAA22276; Tue, 6 Jul 1999 18:55:19 -0500 Sender: bobd@palaver.net Message-ID: <37829767.13102812@palaver.net> Date: Tue, 06 Jul 1999 18:55:19 -0500 From: Bob Dusek X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.1.131 i586) X-Accept-Language: en MIME-Version: 1.0 To: Ralf Weidemann CC: PGSQL-GENERAL-ML Subject: Re: [GENERAL] sorting by date & time in descending order ?? References: <14080.54206.589052.518312@onyx.nowhere.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Ralph, Did you try: select surname, creationdate, creationtime from message order by creationdate desc, creationtime desc; ?? It appears that all of your other queries are working as expected. Bob Ralf Weidemann wrote: > > Hi all, > > I want to sort my output by date & time in descending > order. How can I do this ? Date or time alone is not > enough and the combination of both does not work. At > least in the way I tried it.. > > Thanks, > Ralf > > wdb=> select surname, creationdate, creationtime > from message order by creationtime desc; > surname |creationdate|creationtime > --------------------+------------+------------ > Name_1 | 30.03.1999|14:46:17 > Name_2 | 30.03.1999|14:05:47 > Name_2 | 30.03.1999|10:10:04 > Name_2 | 29.03.1999|09:10:04 > Name_2 | 30.03.1999|09:10:04 > Name_3 | 22.03.1999|06:02:55 > (6 rows) > > wdb=> select surname, creationdate, creationtime > from message order by creationdate desc; > surname |creationdate|creationtime > --------------------+------------+------------ > Name_2 | 30.03.1999|14:05:47 > Name_2 | 30.03.1999|10:10:04 > Name_1 | 30.03.1999|14:46:17 > Name_2 | 30.03.1999|09:10:04 > Name_2 | 29.03.1999|09:10:04 > Name_3 | 22.03.1999|06:02:55 > (6 rows) > > wdb=> select surname, creationdate, creationtime > from message order by creationdate, creationtime desc; > surname |creationdate|creationtime > --------------------+------------+------------ > Name_3 | 22.03.1999|06:02:55 > Name_2 | 29.03.1999|09:10:04 > Name_1 | 30.03.1999|14:46:17 > Name_2 | 30.03.1999|14:05:47 > Name_2 | 30.03.1999|10:10:04 > Name_2 | 30.03.1999|09:10:04 > (6 rows) > > CREATE TABLE Message > ( > MessageID SMALLINT NOT NULL, > Title CHAR(20) NOT NULL, > Surname CHAR(50) NOT NULL, > EMail CHAR(100), > MessageURL CHAR(100), > Text VARCHAR NOT NULL, > CreationDate DATE NOT NULL, > CreationTime TIME NOT NULL, > Expiry SMALLINT NOT NULL > );