Re: SQL Date Challenge - Mailing list pgsql-sql

From Alex Pilosov
Subject Re: SQL Date Challenge
Date
Msg-id Pine.BSO.4.10.10106041653210.2255-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: SQL Date Challenge  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
On Mon, 4 Jun 2001, Josh Berkus wrote:

> 
>     This doesn't solve my problem, as the suggestion above presupposes that
> I have a temp table of all possible dates in the range, or
Yes, you must have such a table, or you have to iterate over existing
table.

> misunderstands that I am trying to find all Wednesdays in column x.
> 
>     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?

No. Same reason why you cannot write a select returning all values from 1
to 1000. You must have table to iterate over. 

When stored procedures are able to return sets (they do, but halfway: C
ones can, but no other language supports that), you may have it a bit
easier...



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: SQL Date Challenge
Next
From: Peter Eisentraut
Date:
Subject: Re: SQL Date Challenge