ADSM-L

Re: Events table information.

2003-10-27 07:59:25
Subject: Re: Events table information.
From: Anders Pontusson <anders.pontusson AT EXIST DOT SE>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 27 Oct 2003 13:41:58 +0100
The problem is when selecting from events table it's by default generated
with the information of todays date only. Using
(CURRENT_TIMESTAMP-SCHEDULED_START<'2 00:00:00') will get information less
than two days old within todays info. See the problem? However if you
specify a specific date (i.e. '2003-10-25') the events table will be
generated from this. There's no limitation in SQL saying you can't use
both a specific date and CURRENT_TIMESTAMP at the samt time. I spent hours
figuring this out and note that the following workaround will only work
for less than 200 years...

SELECT * FROM EVENTS WHERE SCHEDULED_START BETWEEN '1970-01-01' AND
'2199-12-31' AND CURRENT_TIMESTAMP-SCHEDULED_START<'2 00:00:00'

regards,
Anders Pontusson

<Prev in Thread] Current Thread [Next in Thread>