Hmmmm that doesn't look right to me, either. Just from observation, it
looks as if the DISTINCT keyword is operating on either the first column in
the result set, or maybe the sorting key, since you are now sorting by
storage pool name. Either way, I'm pretty sure that DISTINCT is supposed to
account for distinct rows in their entirety, and not just certain columns.
I'll have to look into this.
Regards,
Andy
Andy Raibeck
IBM Tivoli Systems
Tivoli Storage Manager Client Development
e-mail: [EMAIL PROTECTED]
"The only dumb question is the one that goes unasked."
"Walker, Lesley R" <[EMAIL PROTECTED]>@VM.MARIST.EDU> on 03/02/2001
11:16:27 AM
Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: Re: How to find out what tape's a client data are on ?
> Just out of curiosity, since I've only casually been following
> this thread, was there a specific reason for the "group by"
> clause?
>
> I think what is desired is simplly an "order by" clause, e.g.
Well, I'm really confused now.
I came up with my own version of the query:
select distinct volume_name,stgpool_name
from volumeusage
where node_name='FOO'
and that produces an answer:
VOLUME_NAME STGPOOL_NAME
------------------ ------------------
ITF010 CPITFPOOL
ITF013 CPITFPOOL
ITF018 CPITFPOOL
ITF026 CPITFPOOL
ITF001 ITFPOOL
ITF003 ITFPOOL
ITF004 ITFPOOL
ITF014 ITFPOOL
ITF025 ITFPOOL
ITF027 ITFPOOL
ITF028 CPITFPOOL
ITF006 ITFPOOL
ITF002 CPITFPOOL
BUT if I add "order by stgpool_name" it doesn't show all the tapes - eg:
VOLUME_NAME STGPOOL_NAME
------------------ ------------------
ITF010 CPITFPOOL
ITF001 ITFPOOL
So what's going on here?