ADSM-L

Re: timestamps in select

2004-01-08 09:40:37
Subject: Re: timestamps in select
From: "Prather, Wanda" <Wanda.Prather AT JHUAPL DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 8 Jan 2004 09:40:02 -0500
This works...

...and start_time>current_timestamp- 4 hours

-----Original Message-----
From: Warren, Matthew (Retail) [mailto:Matthew.Warren AT POWERGEN.CO DOT UK]
Sent: Thursday, January 08, 2004 5:24 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: timestamps in select


                Hallo,

I am using the following select statement;

select entity,((sum(bytes)/1024)/1024) as MB from summary where entity
in (select node_name from nodes where domain_name like 'DM%') and
start_time>timestamp(current_date - 1   days) and activity='BACKUP'
group by entity


I would like to be able to specify a period of hours preceding the
current date/time, rather than a whole number of days [
timestamp(current_date - 1   days)  ]. My SQL's not so hot, if anyone
could show me how to do it I would be very grateful.

Thanks,

Matt.


___________________________ Disclaimer Notice __________________________
This message and any attachments are confidential and should only be read
by those to whom they are addressed. If you are not the intended recipient,
please contact us, delete the message from your computer and destroy any
copies. Any distribution or copying without our prior permission is
prohibited.

Internet communications are not always secure and therefore the Powergen
Group does not accept legal responsibility for this message. The recipient
is responsible for verifying its authenticity before acting on the
contents. Any views or opinions presented are solely those of the author
and do not necessarily represent those of the Powergen Group.

Registered addresses:

Powergen UK plc, 53 New Broad Street, London, EC2M 1SL
Registered in England & Wales No. 2366970

Powergen Retail Limited,  Westwood Way, Westwood Business Park,
Coventry CV4 8LG.
Registered in England and Wales No: 3407430

Telephone     +44 (0) 2476 42 4000
Fax           +44 (0) 2476 42 5432

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