Re: Table with one row

From: x <x_at_not-exists.org>
Date: Wed, 26 Oct 2005 11:34:57 +0300
Message-ID: <djnf3p$ehr$1_at_domitilla.aioe.org>


How do you enforce the time passes in one direction ?

<zeldorblat_at_gmail.com> wrote in message news:1130034551.098552.37640_at_g43g2000cwa.googlegroups.com...
> >[db2inst1_at_wb-01 ~]$ db2 "create view today (yesterday, today,tomorrow)
> >as (values (current date - 1 day, current date, current date + 1 day))"
> >DB20000I The SQL command completed successfully.
>
> The whole point of having a table for it is that it /doesn't/ have to
> be the same as the current date (in the "real world"). In our case,
> our daily processing run occurs at 11:00 AM. At that point we advance
> the dates in the table. So, on any given day, after the job has run,
> the value of "today" is one day ahead of the current date -- since we
> are already on the next processing date.
>
> With the help of a calendar table, it's also easy to skip weekends and
> holidays. For example, right now (10/22/2005 at 10:30 PM EST) the
> table has the following in it:
>
> today = 10/24/2005
> yesterday = 10/21/2005
> tomorrow = 10/25/2005
>
Received on Wed Oct 26 2005 - 10:34:57 CEST

Original text of this message