Re: Making NULL entries appear first when ORDER BY <field> ASC

From: Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com>
To: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Making NULL entries appear first when ORDER BY <field> ASC
Date: 2005-02-16 02:24:50
Message-ID: 37d451f705021518246bdb5b05@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ragnar Hafstað 2005-02-16 02:31:13 Re: Making NULL entries appear first when ORDER BY <field>
Previous Message George Weaver 2005-02-16 01:32:17 Re: Working with XML.