ADSM-L

Re: Select statement question...

2003-02-26 09:00:26
Subject: Re: Select statement question...
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 26 Feb 2003 06:59:35 -0700
The column names you refer to in your select list need to be included in
the GROUP BY clause.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.eyebm DOT com (change eye to i to reply)

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




"Coats, Jack" <Jack.Coats AT BANKSTERLING DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
02/25/2003 16:03
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        Select statement question...



The first of these queries works.  What is wrong with the second one? I've
been scratching my balding head and getting nothing but an itching scalp.
Thanks for you help! ... Jack

select platform_name as OS, -
client_os_level as OS_VER, -
node_name as Node, -
cast(cast(client_version as char(2)) || '.' -
|| cast(client_release as char(2)) || '.' -
|| cast(client_level as char(2)) || '.' -
|| cast(client_sublevel as char(2)) -
as char(15)) as "Client" -
from nodes -
order by platform_name, "Client", Node


select platform_name as OS, -
  client_os_level as OS_VER, -
  cast(cast(client_version as char(2)) || '.' -
  || cast(client_release as char(2)) || '.' -
  || cast(client_level as char(2)) || '.' -
  || cast(client_sublevel as char(2)) -
    as char(15)) as "Client", -
  count(*) -
 from nodes -
  group by platform_name, -
    client_os_level -
  order by OS, OS_VER, "Client"

<Prev in Thread] Current Thread [Next in Thread>