ADSM-L

Re: select syntax

2005-05-20 13:45:57
Subject: Re: select syntax
From: Joni Moyer <joni.moyer AT HIGHMARK DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 20 May 2005 13:45:24 -0400
Thanks Andy!  It worked like a charm!  I appreciate the help!

********************************
Joni Moyer
Highmark
Storage Systems
Work:(717)302-6603
Fax:(717)302-5974
joni.moyer AT highmark DOT com
********************************



             "Andrew Raibeck"
             <storman AT US DOT IBM.C
             OM>                                                        To
             Sent by: "ADSM:           ADSM-L AT VM.MARIST DOT EDU
             Dist Stor                                                  cc
             Manager"
             <[email protected]                                     Subject
             .EDU>                     Re: select syntax


             05/20/2005 01:38
             PM


             Please respond to
             "ADSM: Dist Stor
                 Manager"
             <[email protected]
                   .EDU>






Sure, just add a column that multiples the two columns together
(est_capacity_mb * pct_utilized) and divide by 1024.0 to get GB, and again
by 100 (to express the pct_utilized as a fractional value):

cast(est_capacity_mb * pct_utilized / 102400.0 as decimal(6,0)) as "Used
GB"

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2005-05-20
10:16:40:

> Hello everyone!
>
> I run the report below to see the level of our nas toc disk pool and I
was
> wondering if there is a way to also have another column called GB
Utilized
> which multiplies total gb x percent utilized?  I have tried this in so
many
> different ways and I have not been successful.  I'm not sure what I have
> been doing wrong, but it just won't work.  Thank you in advance!
>
> select stgpool_name as "Storage Pool",cast(est_capacity_mb/1024 as
> decimal(6,0)) as "Total GB",pct_utilized as "Percent Utilized" from
> stgpools where stgpool_name='NAS_TOC'
>
> Results of report:
> Storage Pool           Total GB     Percent Utilized
> ------------------     --------     ----------------
> NAS_TOC                      64                 63.1
>
> ********************************
> Joni Moyer
> Highmark
> Storage Systems
> Work:(717)302-6603
> Fax:(717)302-5974
> joni.moyer AT highmark DOT com
> ********************************

<Prev in Thread] Current Thread [Next in Thread>