Re: Select statement question
2002-08-18 21:57:57
Henk,
in most cases your select will product good enough results. But if a shop
have many sessions with small ammounts of data to backup (RDBMS logs or
workstations for example) your query results might become inaccurate.
Instead of "select sum(cast(bytes/1024/1024/1024 as decimal))" use "select
cast(sum(bytes)/1024/1024/1024 as decimal)".
Zlatko Krastev
IT Consultant
Please respond to "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
cc:
Subject: Re: Select statement question
Wayne,
> Can anyone help me with a select query that will tell me how much data
I've
> backed up in the last 24 hours?
select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total GB Backup" -
from summary where start_time>=current_timestamp - 1 day and
activity='BACKUP'
Cheers,
Henk ten Have
|
|
|