ADSM-L

Re: Redefine my question: Is it possible to calculate in a "SELECT -Command" ???

1999-04-13 15:27:45
Subject: Re: Redefine my question: Is it possible to calculate in a "SELECT -Command" ???
From: "Thomas A. La Porte" <tlaporte AT ANIM.DREAMWORKS DOT COM>
Date: Tue, 13 Apr 1999 12:27:45 -0700
Yes, absolutely. You can issue the following query:

select volume_name, -
       (est_capacity_mb * pct_utilized)/100 used -
  from volumes -
 where stgpool_name = 'backuptape_copy' -
   and status = 'FILLING' -
   and access = 'OFFSITE' -
 order by used

In this case the "used" portion just renames the column, so that
it is easier to "order by", and also so you don't get
"(EST_CAPACITY_MB * PCT_UTILIZED)/100" as your column heading.

Also, you might want to cast the "used" column to an integer, in
order to round to two decimal places, or however many you choose.

 -- Tom

Thomas A. La Porte
DreamWorks Feature Animation
tlaporte AT anim.dreamworks DOT com

On Tue, 13 Apr 1999, Sabine Rettenberger wrote:

>Hi all,
>
>i want to see the real-utilization of tape volumes.
>
>With this SELECT-Command I can display only the estimated capacity and the
>percent-utilization, but i want to calculate the real-utilization if a tape
>is in filling-status.
>
>select est_capacity_mb, volume_name, pct_utilized from volumes where
>stgpool_name='backuptape_copy' and status='FILLING' and access='OFFSITE'
>
>Is is possible to do calculations within this select-command, or must i
>read this output with another program for calculation ???
>I simply want:                 est_capacity_mb * pct_utilized / 100
>
>
>thanks for your help
>
>Sabine
>
<Prev in Thread] Current Thread [Next in Thread>
  • Re: Redefine my question: Is it possible to calculate in a "SELECT -Command" ???, Thomas A. La Porte <=