Thank you, That is right up the ally of what I was looking for.
Thanks for your assistance. Ben Micron Technology Inc. Boise Id -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Bruce Mitchell Sent: Friday, August 13, 2004 2:09 AM To: [EMAIL PROTECTED] Subject: Re: Select statement help. Ben Bullock wrote :- Ok, this should be simple, but it's driving me nuts. Ben, Try this one ... (caters for mulitple libraries....) * ============================================ */ /* Script Name: Q_STORAGE_UTIL */ /* Description: Display utilisation of all */ /* TAPE Storage Pools */ /* Parameters: None */ /* Example: run Q_STORAGE_UTIL */ /* ============================================ */ set sqldisplaymode wide select - cast (volumes.stgpool_name as varchar(10)) as TAPE_STORAGE_POOL, - cast ((select library_name from devclasses where stgpools.devclass = devclasses.devclass_name ) as varchar(9)) as LIBRARY, - cast (count(volume_name) as integer) as #_VOLUMES, - cast (maxscratch as integer) as MAX_VOLUMES, - cast (sum(volumes.est_capacity_mb)/1024 as integer) as CAPACITY_GB, - cast (avg(volumes.pct_utilized) as integer) as "%_UTILIZATION" - from volumes, stgpools - where volumes.stgpool_name = stgpools.stgpool_name - and devclass_name <> 'DISK' - and devclass_name <> 'FILE' - group by volumes.stgpool_name, maxscratch Bruce Mitchell Storage Management (AABR Project) Barclays Capital Canary Wharf, London * +44 (020) 7773 4010 * [EMAIL PROTECTED] ------------------------------------------------------------------------ For more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. ------------------------------------------------------------------------