TSM V6 SQL Select Question

chad_small

ADSM.ORG Moderator
Joined
Dec 17, 2002
Messages
2,262
Reaction score
52
Points
0
Location
Gilbert, AZ
Website
www.tsmadmin.com
I am converting a script from TSM 5.5 to TSM 6.2 and it appears TSM v6 does not like the MEAN function. The following select works on TSM v5 but not 6. Is there something I need to modify to get it to work?

select STGPOOL_NAME, cast(MEAN(EST_CAPACITY_MB/1024/1024) AS DECIMAL (8,2)) as TB_PER_FULL_VOL from VOLUMES WHERE STATUS='FULL' GROUP BY STGPOOL_NAME


This basically does the same thing and works on both v5 and v6, it's just interesting that MEAN no longer works.

select STGPOOL_NAME, CAST(AVG(EST_CAPACITY_MB/1024/1024) AS DECIMAL(8,2)) as TB_PER_FULL_VOL from VOLUMES WHERE STATUS='FULL' GROUP BY STGPOOL_NAME
 
Hi,

This is because there is no MEAN aggregate function in DB2, and TSM 6 is using DB2 database.

Zoli
 
Yeah I figured that when I couldn't get a search result from GOOGLE when searching DB2 MEAN FUNCTION. Thanks for confirming it.
 
Back
Top