Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: Run Status excel report showing duplicate values

$
0
0

The problem is that you are using plain "AND" statements in your WHERE clause, I think, and because you called out all the tables in the FROM statement.

 

I pulled your query apart to retrieve data only from the RUN table. All the retrieved records were unique. As soon as I added the AND statements to bring in the data from the TESTCYCL table, records started to get duplicated.

 

I'm not going to take the time to figure it out completely, but I think you need to be using JOIN - ON statements to join data from the secondary tables into your results.  Here's an example of just the Run and TestCycle data.

SELECT
  R.RN_RUN_ID "Run ID",
  TI.TC_testcycl_id,
  R.RN_STATUS "Run Status",
  R.RN_TESTER_NAME "Tester",
  TI.TC_PLAN_SCHEDULING_DATE "Planned Exec Date",
  TI.TC_PLAN_SCHEDULING_TIME "Planned Exec Time",
  R.RN_EXECUTION_DATE "Exec Date",
  R.RN_EXECUTION_TIME "Exec Time"

FROM
  RUN R

join TESTCYCL TI ON
  TI.TC_TEST_ID = R.RN_TEST_ID 
  AND TI.TC_TEST_INSTANCE = R.RN_TEST_INSTANCE

order by TI.TC_testcycl_id

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles