I have one main question: I tried to create a query in SQL:
Select Date, Status From Table
My result, for example,
2016-06-07 FAILED
2016-06-07 FINISH OK
2016-07-07 FINISH OK
2016-07-07 FINISH OK
Is it possible to indicate If the status is "FAULT" from 2016-06-07, print only one line with the failed status. If it just finishes normally, printing will end normally. I would like to get this result:
2016-06-07 FAILED
2016-07-07 FINISH OK
Thank,
EDIT: I have only 2 statuses: FAILED and FINISH OK
more and more dates and results:
2016-06-07 FAILED
2016-06-07 FINISH OK
2016-06-07 FINISH OK
2016-06-07 FINISH OK
2016-06-07 FINISH OK
2016-07-07 FINISH OK
2016-07-07 FINISH OK
2016-07-07 FINISH OK
2016-07-07 FINISH OK
2016-07-07 FINISH OK
2016-07-08 FINISH OK
2016-07-08 FINISH OK
2016-07-08 FINISH OK
2016-07-08 FAILED
2016-07-08 FINISH OK
I would like to:
2016-06-07 FAILED
2016-07-07 FINISH OK
2016-07-08 FAILED
If I have FAILED status in the date, I would like to print “FAILED”, but if I do not have the status “FAILED”, I would print “FINISH OK”, is it better?
source
share