Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
As per the requirement i need to generate a row in the table. For a any given server on a given date there will always be on record in with UP status and if the server is down on that then only one record with DOWN status with be inserted in table its duration.
Date | Server | Status | Duration |
21/09/2015 | A | UP | 12 |
21/09/2015 | B | UP | 112 |
21/09/2015 | B | DOWN | 78 |
22/09/2015 | A | UP | 32 |
22/09/2015 | A | DOWN | 32 |
22/09 | B | UP | 455 |
In the above table Server A has only UP status on 21/09/2015 , So we need to generate a new row with DOWN Status with duration as 0.
The expected output will be
Date | Server | Status | Duration |
21/09/2015 | A | UP | 12 |
21/09/2015 | A | DOWN | 0 |
21/09/2015 | B | UP | 112 |
21/09/2015 | B | DOWN | 78 |
22/09/2015 | A | UP | 32 |
22/09/2015 | A | DOWN | 32 |
22/09 | B | UP | 455 |
22/09 | B | DOWN | 0 |
Thanks for confirming ...can you please mark the correct answer and close this thread