Re: Select Statement
2001-09-28 08:22:51
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>
|
- Select Statement, Marc Levitan
- Re: Select Statement, Guan, Phillip
- Re: Select Statement, Marc Levitan
- Re: Select Statement,
Hervé CHIBOIS <=
- Re: Select Statement, Alan Davenport
- Re: Select Statement, Guan, Phillip
- Select Statement, Matthew Large
- Re: Select Statement, Alan Davenport
- Re: Select Statement, Ford, Phillip
- Re: Select Statement, PINNI, BALANAND (SBCSI)
- Select Statement, Joshua S. Bassi
- Re: Select Statement, Joshua S. Bassi
- Re: Select Statement, Richard Cowen
|
|
|