Yep, I am an SQL newbie, but some help would be nice. The script at the bottom terminates with this message: ANR2938E The column 'VOLUME_NAME' is not allowed in this context; it must either be named in the GROUP BY clause or be nested within an aggregate function. and points to the left(volume_name, 8) portion of the query. I have played with it and still get this message. Could someone please explain why this is occuring and how I can fix my script?
TIA ... Jack /* Tape-Volumes */ /* Listing is for all known nodes, and the tape volumes required to do a restore */ set sqldatetimeformat i set sqldisplaymode w set sqlmathmode r commit select distinct copy_type, left(node_name, 12), - left(volume_name, 8), left(stgpool_name, 16) - from adsm.volumeusage - group by node_name, copy_type
