Tue Tip: How to identify old projects based on inactivity

Document created by DaveCarmack Employee on Jun 17, 2014
Version 1Show Document
  • View in full screen mode

Use this Oracle SQL script which will produce a report that will sort so
that oldest projects appear at the top of the list:

  

SELECT HARENVIRONMENT.ENVIRONMENTNAME PROJECT,

MAX(TO_CHAR(HARVERSIONS.MODIFIEDTIME, 'DD-MON-YYYY HH24:MI:SS')) LAST_ACTIVITY

FROM HARVERSIONS

  INNER JOIN HARVERSIONINVIEW ON HARVERSIONS.VERSIONOBJID = HARVERSIONINVIEW.VERSIONOBJID

  INNER JOIN HARVIEW ON HARVIEW.VIEWOBJID = HARVERSIONINVIEW.VIEWOBJID

  INNER JOIN HARENVIRONMENT ON HARENVIRONMENT.ENVOBJID = HARVIEW.ENVOBJID

WHERE HARENVIRONMENT.ENVOBJID > 0

GROUP BY HARENVIRONMENT.ENVIRONMENTNAME

ORDER BY TO_DATE(LAST_ACTIVITY, 'DD-MON-YYYY HH24:MI:SS') DESC

Attachments

    Outcomes