ADSM-L

Re: filespace reporting question

2001-12-13 01:58:24
Subject: Re: filespace reporting question
From: Steve Harris <STEVE_HARRIS AT HEALTH.QLD.GOV DOT AU>
Date: Thu, 13 Dec 2001 16:55:15 +1000
You guys are getting hung up on coverting stuff to days.  Just use timestamp 
arithmetic and the time handling facilities of sql.

select filespace_name as "Filespace", node_name as "Node", \
    days(current_date)-days(backup_end) as "Last Backup", \
    dayname(backup_end) as "Dayof Week"  \
from filespaces  \
where current timestamp - backup_end between 3 hours and 15*24 hours 

Steve Harris
AIX and TSM Admin
Queensand Health
Brisbane Australia 

>>> "Mr. Lindsay Morris" <lmorris AT SERVERGRAPH DOT COM> 13/12/2001 1:49:32 >>>
I never tried this, but since one hour is .04166 days, can you say
 ...where (days(backup_end) < (days(current_date)-.04166) ...
?


----------------------------
Mr. Lindsay Morris
Mr. Lindsay Morris
CEO
Applied System Design
www.servergraph.com <http://www.servergraph.com>
859-253-8000 ofc
425-988-8478 fax


> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
> Joseph Dawes
> Sent: Wednesday, December 12, 2001 10:19 AM
> To: ADSM-L AT VM.MARIST DOT EDU 
> Subject: filespace reporting question
>
>
> Does anyone know how to use a select statement like the following but
> instead of having it report on days have it report on hours? i.e. from now
> -3 hours and less than 15 days.
>
>
>
> select filespace_name as "Filespace", node_name as "Node",
> days(current_date)-days(backup_end) as
>                                  "Last Backup",dayname(backup_end) as "Day
> of Week" from filespaces where (days(backup_end) <
>                                  (days(current_date)-1) and
> (days(current_date)- days(backup_end) <= 15))
>



**********************************************************************
This e-mail, including any attachments sent with it, is confidential 
and for the sole use of the intended recipient(s). This confidentiality 
is not waived or lost if you receive it and you are not the intended 
recipient(s), or if it is transmitted/ received in error.  

Any unauthorised use, alteration, disclosure, distribution or review 
of this e-mail is prohibited.  It may be subject to a statutory duty of 
confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this 
e-mail in error, you are asked to immediately notify the sender by 
telephone or by return e-mail.  You should also delete this e-mail 
message and destroy any hard copies produced.
**********************************************************************
<Prev in Thread] Current Thread [Next in Thread>