I'm trying to extract the list of test instances from test lab that are linked to only closed,rejected and deferred defects. The test instances can be linked to more than one defect. In that case, I have to look through all the linked defects and if any of the defects are not closed/rejected/deferred, then the instance should not be picked. Following is the query that I use to extract all the test instances with linked defects, but this query also returns the open defects as well. Please help me in refining the query to eliminate the open defects.
Select
TESTCYCL.TC_TEST_ID as Test_ID,
TESTCYCL.TC_STATUS as TC_STATUS,
TESTCYCL.TC_EXEC_DATE As Actual_Execution_Date,
BUG.BG_BUG_ID as Defect_ID, BUG.BG_USER_57 AS Project,
BUG.BG_STATUS as DEFECT_Status,
BUG.BG_USER_34 As Testing_Type,
BUG.BG_SEVERITY As Defect_Severity,
BUG.BG_USER_58 As Defect_Priority,
BUG.BG_DETECTION_DATE as Detection_Date
FROM BUG, TEST, V_LINK_TESTCYCL, TESTCYCL, CYCLE
WHERE BUG.BG_BUG_ID = V_LINK_TESTCYCL.LN_BUG_ID
AND TESTCYCL.TC_TESTCYCL_ID = V_LINK_TESTCYCL.LN_TESTCYCL_ID
AND TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
AND CYCLE.CY_CYCLE_ID = TESTCYCL.TC_CYCLE_ID
//and (BUG.BG_STATUS='Closed' OR BUG.BG_STATUS='Deferred' OR BUG.BG_STATUS='Rejected')
order by BUG.BG_BUG_ID
The result I'm getting is as follows: Excel -1
I need to exclude 1604 in the result as it is linked to open defect. It will be really great if anyone can help me in getting the expected result.
Thanks, Karthik S S