Re: Need SQL help
2000-01-06 16:26:59
Subject: |
Re: Need SQL help |
From: |
"Cook, Dwight E" <cookde AT BP DOT COM> |
Date: |
Thu, 6 Jan 2000 16:26:59 -0500 |
Would something like below be what you are looking for ?
I don't think you ned to cast the pending_date...
I have no pending volumes on this box (or really any on any of my adsm
servers) but you might give this one a whirl
Dwight
adsm> select stgpool_name,count(pending_date) as "Pending Date Count" from
adsm
.volumes group by stgpool_name,pending_date
STGPOOL_NAME Pending Date Count
------------------ ------------------
BACKUPPOOL 0
BACKUPPOOL 0
TAPEPOOL 0
> ----------
> From: Brazner, Bob[SMTP:Bob.Brazner AT JCI DOT COM]
> Reply To: ADSM: Dist Stor Manager
> Sent: Thursday, January 06, 2000 2:57 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Need SQL help
>
> <<File: pic28309.pcx>>
>
> Subject:
> Need SQL help
>
> Attachment(s):
> <font size=-1></font>
> I'm trying to determine how many tapes are pinned due to REUSEDELAY. I
> need the results grouped by pending_date and storage pool name. My
> SELECT
> statement looks like:
> select cast(pending_date as date), stgpool_name, count(*) from volumes
> group by ???, stgpool_name
> What do I put in the ??? token? I know I can extract the non-summarized
> data and do the summarization outside of ADSM, but it would be nice to be
> able to make a macro and ADSM do the whole thing.
>
> Bob Brazner
> (Embedded image moved to file: pic28309.pcx)
>
>
|
|
|