JRS query to retrieve all projects in RTC which was inactive for past 16 months
![]() Hi,
We are using ALM 6.0.2 and we have around 600 RTC projects that were created over a period of 8 years, now to like to optimize and get list of all RTC projects that were not been used/active for past 16 months. The JRS query created includes some active projects also, can someone help review the query or provide some effective SQL query for the same.
SELECT DISTINCT T1.PROJECT_NAME
FROM RIDW.VW_REQUEST T1
WHERE (T1.PROJECT_ID = 1285 OR T1.PROJECT_ID = 497 OR T1.PROJECT_ID = 1022 OR T1.PROJECT_ID = 145 OR T1.PROJECT_ID = 1364 OR T1.PROJECT_ID = 66...........) AND
( (T1.REQUEST_TYPE = 'Defect' OR T1.REQUEST_TYPE = 'Story' OR T1.REQUEST_TYPE = 'Task' ) AND
MONTHS_BETWEEN(CAST(CURRENT_TIMESTAMP AS DATE), CAST((T1.REC_DATETIME AS DATE)) > 16 AND
(MONTHS_BETWEEN(CAST(CURRENT_TIMESTAMP AS DATE), CAST((T1.REC_DATETIME AS DATE)) <> 16 OR T1.REC_DATETIME IS NULL)
) AND
(T1.ISSOFTDELETED = 0) AND
(T1.REQUEST_ID <> -1 AND T1.REQUEST_ID IS NOT NULL)
Thanks in Advance
|
Accepted answer
![]() Hi again,
Rao Shines selected this answer as the correct answer
|
One other answer
![]() Hi,
|