Results 1 to 1 of 1
Jun 2, 2009, 01:39 #1
- Join Date
- Jun 2009
- 0 Post(s)
- 0 Thread(s)
Retrieve Records based on column, not offset from result set
I'm trying to retrieve records (matching some conditional) relative to a certain column (ID).
For example: if these are the IDs that match the conditional
I'd like to start from say 8, and retrieve the two closest matches on either side, 5,6 and 10,12.
Is there any way to do this with one query? or would I have to have 3 separate queries--one to retrieve the relative record, one to retrieve the records before this relative record, and one to retrieve the records after this relative record?