Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
assuming i'm having historic table of system defects with the following:
Defect ID, Defect Status, Defect Status Date (the first row per Defect is the creation Date, and the following rows per Defect represents the Defect's Status change and Defect's Status change date)
for example,
i have:
ID | Status | Date |
---|---|---|
123 | Open | 13/1/2015 |
123 | fix dev | 16/1/2015 |
123 | fix test | 20/1/2015 |
123 | close | 21/1/2015 |
i need to have:
ID | Status | Date |
---|---|---|
123 | Open | 13/1/2015 |
123 | Open | 14/1/2015 |
123 | Open | 15/1/2015 |
123 | fix dev | 16/1/2015 |
123 | fix dev | 17/1/2015 |
123 | fix dev | 18/1/2015 |
123 | fix dev | 19/1/2015 |
123 | fix test | 20/1/2015 |
123 | close | 21/1/2015 |
123 | close | 22/1/2015 |
123 | close | 23/1/2015 |
just to clearify,
what i need to calculate is the number of defects which are "close" and the number of defect which are NOT "close" per day
Hi,
You can use While clause to generate new rows.
Please find my example.
Hope this helps you.
Regards,
Andrei