Re: how to sort a birthday list ?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Michael Agbaglo <byteshifter(at)shifted-bytes(dot)de>
Cc: josh(at)agliodbs(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: how to sort a birthday list ?
Date: 2002-06-21 12:39:19
Message-ID: 20020621123919.GA11968@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Jun 21, 2002 at 10:30:54 +0200,
Michael Agbaglo <byteshifter(at)shifted-bytes(dot)de> wrote:
>
> of course you could sort by DOY but then you'll have a problem w/ the
> next year:
>
> if it's let's say december and you select the list for the next 60 days,
> persons having birthday in december will appear after persons having
> birthday in january.
>
> I tried to use CASE WHEN... THEN in ORDER BY but it doesn't seem to work
> (syntax error at '')

You also need to worry about leap years. If a birthday is February 29
and there isn't one this year, what do you want to happen?

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2002-06-21 13:22:27 Re: how to sort a birthday list ?
Previous Message Achilleus Mantzios 2002-06-21 09:45:17 Re: date_ge and time_ge