X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D8658329D15 for ; Sun, 19 Sep 2004 15:57:46 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31265-04 for ; Sun, 19 Sep 2004 14:57:39 +0000 (GMT) Received: from msgdirector3.onetel.net.uk (msgdirector3.onetel.net.uk [212.67.96.159]) by svr1.postgresql.org (Postfix) with ESMTP id 62620329CAE for ; Sun, 19 Sep 2004 15:57:41 +0100 (BST) Received: from bolek.coachhouse (213-78-107-28.friaco.onetel.net.uk [213.78.107.28] (may be forged)) by msgdirector3.onetel.net.uk (MOS 3.4.6-GR) with ESMTP id CSK58074; Sun, 19 Sep 2004 15:57:39 +0100 (BST) Received: (Exim 3.36) #1 (Debian)) protocol: esmtp id 1C938A-00051E-00 ; Sun, 19 Sep 2004 15:57:34 +0100 Message-ID: <414D9E5D.8070708@numerixtechnology.de> Date: Sun, 19 Sep 2004 15:57:33 +0100 From: T E Schmitz Reply-To: mailreg@numerixtechnology.de User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: ORDER BY and NULLs Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/127 X-Sequence-Number: 18973 Hello, I am using PostgreSQL 7.4.2 and as I understand NULL values always sort last. However, I have a table from which select using two numerical sort keys "FROM" and "TO". "TO" might be NULL and I would like to display those rows first (without sorting the column in descending order). Is there any way this can be achieved without inserting bogus values into that column? -- Regards/Gruß, Tarlika Elisabeth Schmitz