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'm trying to convert the following select to work in TSM 6.1
select entity, CAST((START_TIME)AS DATE) AS "DATE", CAST((START_TIME)AS TIME) AS "START TIME", CAST((END_TIME) AS TIME) AS "END TIME", cast(SUBSTR(CHAR(START_TIME-END_TIME),3,9)as time) AS "ELAPSED TIME", affected AS Files_Copied, cast((bytes/1073741824) as decimal(18,2)) AS "GB BACKED UP",successful from summary where cast((current_timestamp-start_time)hours as decimal)<24 and upper(activity)='STGPOOL BACKUP'
I have the following and the issue seems to be what is in bold:
select entity, CAST((START_TIME)AS DATE) AS "DATE", CAST((START_TIME)AS TIME) AS "START TIME", CAST((END_TIME) AS TIME) AS "END TIME", cast(SUBSTR(CHAR(START_TIME-END_TIME),3,9)as time) AS "ELAPSED TIME", affected AS Files_Copied, cast((bytes/1073741824) as decimal(18,2)) AS "GB BACKED UP",successful from summary where timestampdiff(8, char(current_timestamp-end_time))<=24 and upper(activity)='STGPOOL BACKUP'
Anyone have an example on how I calculate the elapsed time in 6.1?
select entity, CAST((START_TIME)AS DATE) AS "DATE", CAST((START_TIME)AS TIME) AS "START TIME", CAST((END_TIME) AS TIME) AS "END TIME", cast(SUBSTR(CHAR(START_TIME-END_TIME),3,9)as time) AS "ELAPSED TIME", affected AS Files_Copied, cast((bytes/1073741824) as decimal(18,2)) AS "GB BACKED UP",successful from summary where cast((current_timestamp-start_time)hours as decimal)<24 and upper(activity)='STGPOOL BACKUP'
I have the following and the issue seems to be what is in bold:
select entity, CAST((START_TIME)AS DATE) AS "DATE", CAST((START_TIME)AS TIME) AS "START TIME", CAST((END_TIME) AS TIME) AS "END TIME", cast(SUBSTR(CHAR(START_TIME-END_TIME),3,9)as time) AS "ELAPSED TIME", affected AS Files_Copied, cast((bytes/1073741824) as decimal(18,2)) AS "GB BACKED UP",successful from summary where timestampdiff(8, char(current_timestamp-end_time))<=24 and upper(activity)='STGPOOL BACKUP'
Anyone have an example on how I calculate the elapsed time in 6.1?
Last edited: