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/[EMAIL PROTECTED] Internet e-mail: [EMAIL PROTECTED] (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" <[EMAIL PROTECTED]> Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> 02/25/2003 16:03 Please respond to "ADSM: Dist Stor Manager" To: [EMAIL PROTECTED] 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"