Re: Table with one row
- From: "x" <x@xxxxxxxxxxxxxx>
- Date: Wed, 26 Oct 2005 11:34:57 +0300
How do you enforce the time passes in one direction ?
<zeldorblat@xxxxxxxxx> wrote in message
news:1130034551.098552.37640@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >[db2inst1@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
>
.
- Follow-Ups:
- Re: Table with one row
- From: David Cressey
- Re: Table with one row
- From: Roy Hann
- Re: Table with one row
- References:
- Table with one row
- From: zeldorblat
- Re: Table with one row
- From: lennart@xxxxxxxxxxxxxxxxxxx
- Re: Table with one row
- From: zeldorblat
- Table with one row
- Prev by Date: Re: Design for Category Feature
- Next by Date: Software in . Net to retriew yous Statistic
- Previous by thread: Re: Table with one row
- Next by thread: Re: Table with one row
- Index(es):