Re: SQL Date Challenge

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: SQL Date Challenge
Date: 2001-06-04 21:30:33
Message-ID: Pine.LNX.4.30.0106042323430.768-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Josh Berkus writes:

> I am trying to list all Wednesdays that are *not* in column x.
>
> This requires me to build a list of all possible Wednesdays (within a
> date range), preferably *without* first having a table of all dates in
> existance! Some sort of manipulation of the date processor should be
> possible, shouldn't it?

You can't easily build data out of nothing in a declarative way in SQL.
Basically, if you want a list of data you either need to put them in a
table (which you don't want) or list them in the command itself (which you
can't). This isn't made easier by the fact that functions currently can't
return sets without extreme wizardry.

Your problem is probably solved best if some of the computation is shifted
to the client side.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-06-04 21:32:49 Re: SQL Date Challenge
Previous Message Alex Pilosov 2001-06-04 20:56:34 Re: SQL Date Challenge