I need a query to select that row and the rows with the 4 dates prior to the selected date. For example the date selected is 1/19/12, the 4 prior dates could be 11/1/11, 11/12/11, 12/3/11, 12/29/11.

I get the id and the date of the selected row from the grid so returning that record is no problem. But I cannot depend upon the identity ID's not having gaps plus the ordering of the table to get the proper dates would preclude using the ID's anyway.

In a way this is like returning the previous 'n' rows before and including row 'r' but in this case it is based upon the date not the id.

Nope, what you did is the right logic, just a syntax error. You have to name the set you created with this statementselect top 4 * from tblpayrolldatedetail where payrollDate <= '1/16/2012'order by payrollDate desc

select top 1 * from (select top 4 * from tblpayrolldatedetail where payrollDate <= '1/16/2012'order by payrollDate desc) as NewSetIjustCreated-- you could just name it "a" or anything else you wanted order by payrolldate