I think this is a simple way : select case when SUM(BYTES) IS NOT NULL then CAST(SUM(BYTES) AS DEC(40,2))/(1024*1024) else ABS(CAST((0) AS DEC(40,2))) end AS "Total Megabytes" from summary where DAY(end_time) = DAY(CURRENT DATE) and MONTH(end_time)=MONTH(CURRENT DATE) and YEAR(end_time)=YEAR(CURRENT DATE)
----- Original Message ----- From: Robert Dowsett <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 27, 2002 1:46 PM Subject: Calculating amount of data being backed up every 24 hours. > Hi everyone. > > Does anyone have any suggestions regarding how to calculate how much data > is being handled by TSM every day ?? > > Ideally I would like to write a script which tells me how much data is > being backed up by TSM every day (in total), how much is going to disk > storage pools and how much is going to tape storage pools. The trouble is I > can't seem to think up a simple way to measure these statistics without > resorting to complicated select statements and mathematics. > > > Thanks in advance for your help. > > Robert Dowsett >