ADSM-L

Re: Select Statement

2001-09-25 13:51:51
Subject: Re: Select Statement
From: Thorhallur Sverrisson <thorhs AT DEMON.NYHERJI DOT IS>
Date: Tue, 25 Sep 2001 17:34:04 +0000
You where rather close.  This works to get the records since midnight.

select entity from summary where start_time>timestamp(current date, '00:00:00')


The following gets all records since 18:00 the previous day:

select entity from summary where start_time>timestamp(current date - 1 day, 
'18:00:00')


The following gets all records since 2 hours ago (you get the point):

select entity from summary where start_time>timestamp(current date, current 
time - 2 hours)


Hope this helps.

Thorhallur

On Tue, Sep 25, 2001 at 12:59:33PM -0400, Marc Levitan wrote:
> I am looking for a script that will list the clients that backed up and how
> much data was backed up for the previous night and if they were successful.
>
> This is what I have:
>
> select ENTITY as Node_Name, BYTES as Bytes_Transferred, SUCCESSFUL from
> summary where activity='BACKUP' and start_time>='2001-09-23
> 00:00:00.000000' and bytes>0 order by entity
>
> The problem is that I have to change the Day/Time stamp before I run it.
> Is there a way to put a variable like today-1?  I have tried but am not
> successful.
>
> Does anyone have a better script?
>
>
> Marc Levitan
> Storage Manager
> PFPC Global Fund Services
<Prev in Thread] Current Thread [Next in Thread>