ADSM-L

Re: Select Statement

2001-09-28 08:22:51
Subject: Re: Select Statement
From: Hervé CHIBOIS <herve.chibois AT ORNESS DOT FR>
Date: Fri, 28 Sep 2001 14:13:38 +0200
Hi All,

Here is mine and the output, You just have to change the start time end end
time of your schedules

If anybody knows how to add dates in a SQL statement, I would be interested.
(2001-09-30 + 1day = 2001-10-01 ==> That the trick)

Rv


/*********************************************************************/
/*                                                                   */
/* SZ_ALL - MB transfered during night sessions in [$1..$2] interval */
/*                                                                   */
/* run sz_all 2001-09-14 2001-09-15                                  */
/*                                                                   */
/* DATE          NB_OF_FILES   TOTAL_MB                              */
/* ----------    -----------   --------                              */
/* 2001-09-14         160948      24954                              */
/*                                                                   */
/*********************************************************************/
def scr sz_all desc="MB transfered during night sessions in [$1..$2]
interval"
upd scr sz_all "select '$1' as DATE,sum(affected) as NB_OF_FILES,     -"
upd scr sz_all "sum(cast(bytes/1000000 as decimal(6,0))) as TOTAL_MB  -"
upd scr sz_all "from summary where activity='BACKUP' and start_time>= -"
upd scr sz_all "timestamp(concat('$1',' 20:00')) and start_time<      -"
upd scr sz_all "timestamp(concat('$2',' 05:00'))"



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