Do you mean that if the next report is on the next day then it doesn't show?
i.e.

Previous = 8
This > Next = nothing



-----Original Message-----
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
Sent: Friday, 17 October 2003 5:02 p.m.
To: CF-Talk
Subject: OT: SQL Query

I need to write a query and really don't know where to start -- here is the
description.

I have a number of reports all dated, but dated by day (no time).
Some of the reports are on the same day If I have an ID value, I need to
grab the report before and the report after that ID and it needs to be by
date.

Here is what the data looks like:

ReportID  |  ReportDate  |  Report |
1            9/10/2003
2            9/11/2003
3            9/11/2003
4            9/11/2003
5            9/12/2003
8            9/12/2003
9            9/14/2003
11            10/01/2003 etc..

If I am looking at ReportID (5), then I want to know that reportID 4 is
previous and reportID 8 is next

So my output should be
Previous = 4
This > Next = 8

Oh, and I need to know if previous is Nothing or Next is nothing (ie there
isn't anymore eitherway).

ANY help would be greatly appreciated!

Paul Giesenhagen
QuillDesign


  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to