Ok, my brain is broken today and I can't seem to think in SQL right. Totally blanking here.
Here's the situation. We have an event log table called [EVENTS]. It's got a bunch of columns, but all we care about are UNIQUEID, DTTMSTAMP, and MESSAGE.
There's two kinds of events I'm interested in: the ones saying "Task started" and the ones says "Task Failed". What I need is all of the "Task Failed" types with the "Task started" message that is most recent before it.
There's lots more started than fail (obviously).
How do I do that join?
Here's the situation. We have an event log table called [EVENTS]. It's got a bunch of columns, but all we care about are UNIQUEID, DTTMSTAMP, and MESSAGE.
There's two kinds of events I'm interested in: the ones saying "Task started" and the ones says "Task Failed". What I need is all of the "Task Failed" types with the "Task started" message that is most recent before it.
There's lots more started than fail (obviously).
How do I do that join?
cranky