TSM DB2 SQL query for display backup vm

29 views Asked by At

Need some help with below TSM SQL statement to display backup status and to group by the output using the column. Can someone help me with correct SQL query to do display the output using group by. It is failing with error ANS80001I return code 3

 select 
   SUB_ENTITY
  ,SCHEDULE_NAME
  ,ACTIVITY_TYPE
  ,SUCCESSFUL
  ,SUBSTR(CHAR(start_time),1,19) AS START_TIME
  ,SUBSTR(CHAR(END_TIME),1,19) AS END_TIME
  ,cast(float(bytes)/1024/1024 as DEC(15)) as MB 
from  SUMMARY_EXTENDED 
 where START_TIME>current_timestamp - 18 hours 
   and SCHEDULE_NAME like '%abcdf' 
   and SUB_ENTITY IS NOT NULL 
   and SUB_ENTITY <> 'Aggregate' 
group by sub_entity,schedule_name,SUCCESSFUL

I am expecting an output sub_entity activity type start_time end_time Successful

0

There are 0 answers