• Here is a simplified version of my last query...

    SELECT * FROM #LogInfo

    WHERE ([CURRENT LSN]) > (SELECT TOP (1) [Current LSN]                                                         FROM #LogInfo                                                         WHERE [Checkpoint Begin] IS NOT NULL                                                                                                                         ORDER BY [Checkpoint Begin] DESC)

    I'm not at my desktop, so I didn't test this yet to ensure it didn't get broken after revising; use at your own risk.

    Hope this helps,

    James

    ~ Without obstacles, you cannot progress ~
    http://sqln.blogspot.com/