Hi Robert, 

Maybe something like this?

SELECT cast((entity) as char(36)) as "Node 
Adsm2",cast(substr(address,1,locate_in_string(address,':')-1) as char(20)) , 
DATE(start_time) as DATE, cast((activity) as char(15)) as OPERATION, 
cast(float(SUM(bytes))/1024/1024/1024 as DEC(8,1)) as GB FROM summary WHERE  
activity='RETRIEVE' OR activity='RESTORE' GROUP BY 
entity,substr(address,1,locate_in_string(address,':')-1),DATE(start_time),activity
 ORDER BY DATE


Met vriendelijke groet / With kind regards,
Paul van Dongen

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of Robert 
Ouzen
Sent: 24 September 2016 07:55
To: ADSM-L@VM.MARIST.EDU
Subject: [ADSM-L] Script help

Hi  to all


I have this script to receive information about restore and retrieve activity.

SELECT cast((entity) as char(36)) as "Node Adsm2" , DATE(start_time) as DATE, 
cast((activity) as char(15)) as OPERATION, 
cast(float(SUM(bytes))/1024/1024/1024 as DEC(8,1)) as GB FROM summary WHERE  
activity='RETRIEVE' OR activity='RESTORE' GROUP BY 
entity,DATE(start_time),activity ORDER BY DATE   ESC

I want to add ADDRESS  , field in summary table too.

But when I added it I got a lot of entries of each ADDRESS  even when I added 
ADDRESS to GROUP BY

Any idea to get for a single  ADDRESS ?

Best Regards

Robert

Reply via email to