Is it possible to return all rows between matched rows?
What I'm trying to is query an audit table where jobs writes an audit table. There is a clear start audit message and end audit message as well as info between. Is it possible to get a select statement to return all the rows between the "start" audit entry and "end" entry?
Example of data.
DATE TIME USER ENTRY
----------------------- -------- -------------------- --------------------------------------------------------------------
2015-04-13 07:30:15.150 07:30:15 CmdLne SOME JOB STARTED FOR PROCESSING DATE 13/04/2015
2015-04-13 07:31:15.150 07:31:15 CmdLne PROCESSED 10 WHATEVERS
2015-04-13 07:32:25.150 07:32:25 CmdLne PROCESSED 10 SOMETHINGS
2015-04-13 07:33:33.150 07:33:33 CmdLne PROCESSED 40 XYZ
2015-04-13 07:33:34.150 07:33:34 CmdLne SOME JOB FINISHED FOR PROCESSING DATE 13/04/2015
Because it's unknown how many audit entries there will be during an audit write it has to be able to select everything between the "start" entry and "end" entry. Is this possible?