Excellent Thanks Paul
P Baines <[EMAIL PROTECTED]> on 07/23/2003 01:17:20 PM Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] cc: (bcc: John Naylor/HAV/SSE) Subject: Re: SQL for Node Total/Used space Maybe this: SELECT nodes.NODE_NAME, sum(filespaces.CAPACITY) as capacity, sum(filespaces.CAPACITY*filespaces.PCT_UTIL/100) AS "MB USED" FROM NODES,FILESPACES WHERE NODES.NODE_NAME=FILESPACES.NODE_NAME AND PLATFORM_NAME LIKE'W%NT' AND CAST(LASTACC_TIME AS DATE)>'07/01/2003' group by nodes.node_name -----Original Message----- From: John Naylor [mailto:[EMAIL PROTECTED] Sent: 23 July 2003 13:19 To: [EMAIL PROTECTED] Subject: SQL for Node Total/Used space People, I have been playing aroung with some sql to extract for a particular platform, the total capacity /used per filespace for recently accessed clients. What I have below does this . I would also like to pull this out but summed per node instead of showing the individual filespaces and I cannot get it to work Suggestions gratefully received. SELECT NODES.NODE_NAME,FILESPACE_NAME,CAPACITY, - (CAPACITY*PCT_UTIL/100) AS "MB USED" - FROM NODES,FILESPACES - WHERE NODES.NODE_NAME=FILESPACES.NODE_NAME - AND PLATFORM_NAME LIKE'W%NT' - AND CAST(LASTACC_TIME AS DATE)>'07/01/2003' John ********************************************************************** The information in this E-Mail is confidential and may be legally privileged. It may not represent the views of Scottish and Southern Energy plc. It is intended solely for the addressees. Access to this E-Mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any unauthorised recipient should advise the sender immediately of the error in transmission. Scottish Hydro-Electric, Southern Electric, SWALEC and S+S are trading names of the Scottish and Southern Energy Group. ********************************************************************** Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system.