ADSM-L

Re: Select statement question

2005-05-04 12:14:46
Subject: Re: Select statement question
From: Curtis Stewart <Curtis.Stewart AT LAWSON DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 4 May 2005 11:10:52 -0500
"Thought I had it....

How would I need to adjust the macro to include information between two
dates?"


Try this...

select
nodes.domain_name,summary.activity,sum(cast(summary.bytes/1024/1024/1024
as decimal(6,2)))
as GB from nodes, summary  where (end_time between current_timestamp - $1
hours and
current_timestamp - $2 hours) and (activity='BACKUP' or activity='RESTORE'
or activity='ARCHIVE' or
activity='RETRIEVE') and ((nodes.node_name=summary.entity)) group by
domain_name,summary.activity

$1 is the start time in hour past... like 72 for three days
$2 is the end time


curtis.stewart AT lawson DOT com

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