Fw: Select statement output
2005-04-20 15:19:08
Not exactly as what you wanted, but will this work better?
select count(*) as volumes_count, status from volumes where status in
('FULL','FILLING','Empty', 'PENDING') group by status
Sung Y. Lee
----- Forwarded by Sung Y Lee/Austin/IBM on 04/20/2005 03:17 PM -----
"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 04/20/2005
02:42:29 PM:
> I have defined the following script to find the status of tapes.
>
> Name VOLUME_USAGE
>
> Description -
>
> Last Update Date/Time 2005-04-20 14:40:07.000000
>
> Last Update by (administrator) LIDZR8V
>
> Managing profile -
>
>
>
>
>
> Lines:
>
>
>
> /* Volumes that are full & filling */
> select count(*) volume_name from volumes where status in
('FULL','FILLING')
> /* Volumes that are empty */
> select count(*) volume_name from volumes where status='EMPTY'
> /* Volumes that are pending */
> select count(*) volume_name from volumes where status='PENDING'
>
>
> I get the following results:
>
>
> VOLUME_NAME
> -----------
> 529
>
>
> VOLUME_NAME
> -----------
> 0
>
>
> VOLUME_NAME
> -----------
> 160
>
>
>
> How do I get a heading of Full/Filling Volumes to appear above the first
> column? Empty to appear above the second and Pending above the third?
> Thank you in advance!
>
> ********************************
> Joni Moyer
> Highmark
> Storage Systems
> Work:(717)302-6603
> Fax:(717)302-5974
> joni.moyer AT highmark DOT com
> ********************************
|
|
|