ADSM-L

Re: SQL Query

2005-04-13 08:52:30
Subject: Re: SQL Query
From: Iain Barnetson <Iain.Barnetson AT HALLIBURTON DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 13 Apr 2005 13:52:03 +0100
I use this query to get a report of the backups by node & filespace,
showing the start & end times. 

select -
     node_name as "Node", -
     filespace_name as "Filespace", -
     substr(char(filespaces.backup_start), 1, 10) as "Backup Date" ,-
     substr(char(filespaces.backup_start), 12, 8) as "Start Time" ,-
     substr(char(filespaces.backup_end), 12, 8) as "End Time"-
from filespaces -
order by node_name,filespace_name



What would I have to add to this to get the corresponding node's 'bytes'
from the summary table, formatted to 2x decimal places in Gb's.

I've tried using this:

select cast(float(sum(bytes))/1024/1024/1024 as decimal(14,2)) as GbBkUp
from summary where (end_time between '2005-04-12 07:45:02' and
'2005-04-13 07:45:01') and activity='BACKUP'


But I'm not sure how to integrate that into the SQL query above.

Any help greatly appreciated.

Iain

<Prev in Thread] Current Thread [Next in Thread>
  • Re: SQL Query, Iain Barnetson <=