ADSM-L

Re: Select statement question...

2003-02-25 21:55:12
Subject: Re: Select statement question...
From: Paul Ripke <stixpjr AT BIGPOND.NET DOT AU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 26 Feb 2003 13:54:13 +1100
On Wednesday, Feb 26, 2003, at 10:03 Australia/Sydney, Coats, Jack
wrote:

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"

All non-summary columns selected have to be in the group by clause. In
your
case, this means the "Client" column. BTW, I haven't tried this, and
I'm not
sure TSM SQL-like interface will accept it.

BTW: Hope this helps your scalp stop itching...

Cheers,
--
Paul Ripke
Unix/OpenVMS/TSM/DBA
101 reasons why you can't find your Sysadmin:
68: It's 9AM. He/She is not working that late.
-- Koos van den Hout

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