Posted by teddysnips on 12/05/05 11:52
MC wrote:
> Here si one way of doing it.
>
> SELECT *
> FROM tblTest
> WHERE
> fldCLocktime = (select max(ClockTime) from tblTest where clocktime <
> '02/01/2005 12:34' and fldEmployeeID = 1)
> AND
> fldEmployeeID = 1
Hi MC
Your response put me onto another way that doesn't use a sub-query:
SELECT TOP 1 *
FROM tblTest WHERE fldClocktime <
'02/01/2005 12:34' and fldEmployeeID = 1
ORDER BY fldClocktime DESC
Both methods work fine - thanks for your help.
Edward
[Back to original message]
|