Wednesday, 11 January 2012

Quality Center - Delete all alerts (2 Levels) belong to the a root requirement

Problem:
There is no direct way to clear alerts belongs to others. However, it can be achieved by performed a DELETE query from Administration.
 
Solution:
Below are the query that will clear all alerts from to a root requirement. It will delete all the alerts 2 level descendent from the root.
 
Query:
DELETE FROM ALERT 
WHERE AT_ENTITY_TYPE = 'REQ'
AND AT_KEY1 IN (
SELECT RQ_REQ_ID FROM REQ where 
RQ_FATHER_ID IN (SELECT RQ_REQ_ID FROM REQ WHERE RQ_FATHER_ID = (SELECT RQ_REQ_ID FROM REQ WHERE RQ_REQ_NAME = 'Async SOAP'))
OR 
RQ_FATHER_ID IN (SELECT RQ_REQ_ID FROM REQ WHERE RQ_REQ_NAME = 'Async SOAP')
OR
RQ_REQ_NAME = 'Async SOAP'
)

No comments:

Post a Comment