pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Michael Agbaglo <byteshifter@shifted-bytes.de>
Cc: josh@agliodbs.com
Cc: pgsql-sql@postgresql.org
Subject: Re: how to sort a birthday list ?
Date: Fri, 21 Jun 2002 07:39:19 -0500
Message-ID: <20020621123919.GA11968@wolff.to> (raw)
In-Reply-To: <3D12E43E.3090307@shifted-bytes.de>
References: <3D122508.70104@shifted-bytes.de>
	<200206201703.52435.josh@agliodbs.com>
	<3D12E43E.3090307@shifted-bytes.de>

On Fri, Jun 21, 2002 at 10:30:54 +0200,
  Michael Agbaglo <byteshifter@shifted-bytes.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?



view thread (7+ messages)  latest in thread

Message-ID: <20020621123919.GA11968@wolff.to>
Permalink:  ../20020621123919.GA11968@wolff.to/
Also on:    postgresql.org/message-id/20020621123919.GA11968@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to, byteshifter@shifted-bytes.de, josh@agliodbs.com
  Subject: Re: how to sort a birthday list ?
  In-Reply-To: <20020621123919.GA11968@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox