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 E13E78BA39F for ; Wed, 16 Feb 2005 02:25:33 +0000 (GMT) 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 63395-03 for ; Wed, 16 Feb 2005 02:25:16 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by svr1.postgresql.org (Postfix) with ESMTP id E51A98BA3B2 for ; Wed, 16 Feb 2005 02:24:49 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so16678wra for ; Tue, 15 Feb 2005 18:24:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=qNPGItFnAbyyCKpDpmBaP39UuhT5JPakcjleDp03zGZCMrhV9OkEAJteXAyQpkX9Pge0VIqyn1JBMSO2Yd0ZuKZXvSDkfjObPCcCkg1N8Gu+mr6jL9pfLNH3JwRLKSG0ycMw8zn1j/HAPNzx1pjlX1tSF9tvkbkepdMWTbykhrY= Received: by 10.54.47.40 with SMTP id u40mr67064wru; Tue, 15 Feb 2005 18:24:50 -0800 (PST) Received: by 10.54.11.6 with HTTP; Tue, 15 Feb 2005 18:24:50 -0800 (PST) Message-ID: <37d451f705021518246bdb5b05@mail.gmail.com> Date: Tue, 15 Feb 2005 20:24:50 -0600 From: Rosser Schwarz Reply-To: Rosser Schwarz To: Andreas Joseph Krogh Subject: Re: Making NULL entries appear first when ORDER BY ASC Cc: pgsql-sql@postgresql.org In-Reply-To: <200502160055.59288.andreak@officenet.no> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200502160055.59288.andreak@officenet.no> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/156 X-Sequence-Number: 20267 while you weren't looking, Andreas Joseph Krogh wrote: > Any idea how to achieve this? ... ORDER BY coalesce(start_date, '1900-01-01') ASC , coalesce(start_time, '1900-01-01') ASC; /rls -- :wq