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
nigel.
SSChampion
Points: 11636
More actions
October 30, 2014 at 2:36 am
#1755707
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
NigelHow to post questions