Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all I think this shouldnt be complicated but I cant quite figure out how to do this one, i have the following,
incident | date | status |
---|---|---|
AAA | 01/01/2015 12:00 | open |
AAA | 01/01/2015 13:00 | - |
AAA | 01/01/2015 14:00 | - |
AAA | 01/01/2015 15:00 | - |
BBB | 01/01/2015 13:30 | open |
BBB | 01/01/2015 14:10 | - |
BBB | 01/01/2015 14:40 | - |
incident | lateststatus |
---|---|
AAA | hold |
BBB | pause |
Now what i want is quite simple, I have left joined these 2 tables, and what I would like is, for the first table, if the last record for each incident is empty, use the lateststatus as status, so the outcome would be this.
This needs to be done in script please,
incident | date | status |
---|---|---|
AAA | 01/01/2015 12:00 | open |
AAA | 01/01/2015 13:00 | - |
AAA | 01/01/2015 14:00 | - |
AAA | 01/01/2015 15:00 | hold |
BBB | 01/01/2015 13:30 | open |
BBB | 01/01/2015 14:10 | - |
BBB | 01/01/2015 14:40 | pause |
Many Thanks
Hi Gualter,
see attachment.
Regards,
Antonio