Re: CASE in ORDER BY clause - Mailing list pgsql-general

From Louis-David Mitterrand
Subject Re: CASE in ORDER BY clause
Date
Msg-id 20070707082940.GA8222@apartia.fr
Whole thread Raw
In response to Re: CASE in ORDER BY clause  (Viatcheslav Kalinin <vka@ipcb.net>)
List pgsql-general
On Fri, Jul 06, 2007 at 08:02:54PM +0400, Viatcheslav Kalinin wrote:
> Louis-David Mitterrand wrote:
>
> # select start_date from show_date
> # order by
> # case when start_date > CURRENT_DATE then start_date end desc,
> # case when start_date <= CURRENT_DATE then start_date end asc;

But... this works!

Many thanks,

pgsql-general by date:

Previous
From: "Zlatko Matic"
Date:
Subject: Re: Update a single row without firing its triggers?
Next
From: Louis-David Mitterrand
Date:
Subject: Re: CASE in ORDER BY clause