Finding (record -2)

foxmark

New member
Local time
Today, 22:45
Joined
Aug 11, 2011
Messages
3
Hi!

Does anyone can help me please, Im trying to search my DB:

JN----------Date-------------------Status-----Code
15454874--01/01/2011 10:30-------Status1----Code1
15454874--01/01/2011 10:31-------Status2----Code2
15454874--01/01/2011 10:32-------Status3----Code3
15454874--01/01/2011 10:33-------Status4----Code4
15454874--01/01/2011 10:34-------Status5----Code5

How Can I find (Status - 2) let say I want to skip Code1 and Code1 and display Date of (Code 3) but location of the code3 (Not always 3rd place) is not the same for all records - and Codes and number of codes may by different for different JN
Any ideas?
 
In order to solve this puzzle there must be a solid reference in your table structure.
In this table i believe it is the timestamp for a specific JN.

If you want to skip the first record in the final result, create a query that selects the first record using TOP 1. Give the query a name Query1.
Use the the exact same query and use the Where clause like this "Where ID NOT IN (select ID from Query1)
You will notice that the result of the second query gives you the second record.
If you want to skip the first two records, let the first query select the first two records.

Am i making sense?

If not please provide a sample database.

HTH:D
 
I agree with Guus, you need something in your table structure on which to base a query.
Perhaps you could describe/explain your situation in more detail or attach a sample db to show the problem.
 
Thank you for help,
I will try tomorrow at work and post database example.

Regards,
 

Users who are viewing this thread

Back
Top Bottom