ADSM-L

Re: TSM SQL Script

2002-03-20 14:46:10
Subject: Re: TSM SQL Script
From: "Coats, Jack" <Jack.Coats AT BANKSTERLING DOT COM>
Date: Wed, 20 Mar 2002 13:41:18 -0600
Yes,
   That was it! ... Thanks Bill!

You are right, it is not a short query.  Our database is not big, but NT
isn't that fast either.

... Jack

> -----Original Message-----
> From: William F. Colwell [SMTP:bcolwell AT DRAPER DOT COM]
> Sent: Wednesday, March 20, 2002 1:30 PM
> To:   ADSM-L AT VM.MARIST DOT EDU
> Subject:      Re: TSM SQL Script
>
> Jack - I think you should just remove the whole 'group by' clause.
> You are not selecting a column function such has count(*) or avg(column).
>
> Unless you have a very small database or a very fast machine,
> this query will run a long time.
>
> Hope this helps,
>
> Bill
>
> At 12:10 PM 3/20/2002 -0600, you wrote:
> >Yep, I am an SQL newbie, but some help would be nice.
> >The script at the bottom terminates with this message:
> >  ANR2938E The column 'VOLUME_NAME' is not allowed in this context; it
> must
> >either be named in the GROUP BY clause or be nested within an aggregate
> >function.
> >and points to the left(volume_name, 8) portion of the query.  I have
> played
> >with it
> >and still get this message.  Could someone please explain why this is
> >occuring and
> >how I can fix my script?
> >
> >TIA ... Jack
> >
> >/* Tape-Volumes */
> >/* Listing is for all known nodes, and the tape volumes required to do a
> >restore */
> >set sqldatetimeformat i
> >set sqldisplaymode w
> >set sqlmathmode r
> >commit
> >select distinct copy_type, left(node_name, 12), -
> >   left(volume_name, 8), left(stgpool_name, 16) -
> >  from adsm.volumeusage  -
> >  group by node_name, copy_type
>
> ----------
> Bill Colwell
> C. S. Draper Lab
> Cambridge Ma.
<Prev in Thread] Current Thread [Next in Thread>