I have a record set that has the following record structure:
I have a situation where a specified date (ie 16/03/2011) needs to be evaluated against the current recordset. The specified date will pretty much always occur between the records in the recordset (ie - between the end date of record 1 and the start date of record 2)
The recordset will be made up of a number of records that are ordered by date range. The start date and end dates for each record will never overlap another record.
Recordid BeginDate EndDate Details
1 04/01/2011 06/01/2011 Some Details
2 10/01/2011 15/01/2011 Some Additional Detail
3 20/01/2011 25/01/2011 Some Detail in Addition
I wanted a huge amount of help writing an SQL query that would be able to return the record before and after the specified date (16/01/2011). The date will be specified by user entry.