Re: Help on select syntax
2003-07-21 06:38:59
Robert,
In place of your listed date computation, try
cast ((current_timestamp-date_time)hours as integer)<=24
Regards,
Jack Coyle
Rex Healthcare
(919) 784-3792
jack.coyle AT rexhealth DOT com
> ----------
> From: Robert Ouzen[SMTP:rouzen AT UNIV.HAIFA.AC DOT IL]
> Reply To: ADSM: Dist Stor Manager
> Sent: Monday, July 21, 2003 7:09 AM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Help on select syntax
>
> Hi to all
>
> Try to run a select query on the actlog table for certain msgno in certain
> period but got wrong result. Here my select command:
> select nodename , msgno , substr(message,44,14) as "Message "
> from actlog where (msgno=4961 or msgno=4964) and
> date_time=CURRENT_TIMESTAMP
> - 1 days
>
> Without the date_time parameter I got what I want but for the entire
> period
> I need to limit my query for the last 24 hours.
>
> Please advise if possible ..........
>
> Regards Robert Ouzen
> E-mail: rouzen AT univ.haifa.ac DOT il
>
|
|
|