ADSM-L

Re: Select statement question

2002-08-18 21:57:57
Subject: Re: Select statement question
From: Zlatko Krastev <acit AT ATTGLOBAL DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 19 Aug 2002 03:14:58 +0300
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

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