Problem with a complex query

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Andre Beier (Andre.Beier_at_gmx.net)
Date: 06/29/04


Date: Tue, 29 Jun 2004 10:18:25 -0500

Hi,

I want to try to create the following recordset:

I want to create some kind of tree that starts out with one ID.
Every ID can have 5 or less PREVIOUSID's. Each of the PREVIOUSID's can have
up to 5 PREVIOUSID's. This goes on till all PREVIOUSID's are 0 for the final
record.

To make it easier to understand, here is one example:

ID | PREV01 | PREV02 | PREV03 | PREV04 | PREV05
1 0 0 0 0
0
2 1 0 0 0
0
3 0 0 0 0
0
4 2 3 0 0
0
5 0 0 0 0
0
6 0 0 0 0
0
7 0 0 0 0
0
8 6 5 4 0
0
9 0 0 0 0
0
...

Lets say a user queries for id = 8

I want to return a recordset that contains the follwing records:
8 - Requested by user
6,5,4 - PREVID's for record 8
2,3 - PREVID's for record 4
1 - PREVID for record 2

Thanks in advance.

Andre



Relevant Pages

  • Problem creating a complex query
    ... I want to create some kind of tree that starts out with one ID. ... I want to return a recordset that contains the follwing records: ... - PREVID for record 2 ... Andre ...
    (microsoft.public.access.queries)
  • Re: tree view help
    ... Andre ... "Peterbilt" wrote in message ... > folder is opened up it shows the tree view on the left side and i have to ...
    (microsoft.public.windowsxp.general)
  • Re: Why they show "injured" Tsonga when Roger is changing his shirt?????
    ... Because he looks like something that just swung down from the tree? ... "If I was 7-13 against Andre it would be hard to say I was the best of ... Tits are not allowed to be shown on air before 9.pm? ...
    (rec.sport.tennis)