Home Forums SQL Server 2008 SQL Server Newbies How to get the latest record before a defined value in a field RE: How to get the latest record before a defined value in a field

  • If I understand your question then this should suffice

    SELECT TOP 1

    *

    FROM

    DutyRosterShiftHisto

    WHERE

    Time_Stamp > (SELECT Time_Stamp FROM DutyRosterShiftHisto WHERE Manuel=10)

    ORDER BY

    Time_Stamp