ADSM-L

Re: [summary] Select statement question...

2003-02-26 09:56:55
Subject: Re: [summary] Select statement question...
From: "Coats, Jack" <Jack.Coats AT BANKSTERLING DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 26 Feb 2003 08:52:48 -0600
Thanks, I got the answer.  Paul hit it on the head.  My summary of clients
is given by the SQL query:

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(*) as "Count" -
 from nodes -
  group by platform_name, -
    client_os_level, client_version, client_release, client_level,
client_sublevel -
  order by OS, OS_VER, "Client"

My main issue was trying to put the "Client" aggergate in the order by
clause.  Instead, I had to put each of its components in the group by
clause, and then order by clause can contain the name of the casted column
("Client")

> -----Original Message-----
> From: Paul Ripke [SMTP:stixpjr AT BIGPOND.NET DOT AU]
        [Coats, Jack]  [sip]

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [summary] Select statement question..., Coats, Jack <=