Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT Statement
Message
De
08/01/2001 14:09:14
 
 
À
08/01/2001 13:37:01
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00460633
Message ID:
00460725
Vues:
13
Cindy,

>That being said, I don't have enough information (or maybe just brain power) to see the pattern.
SID Desc  PID   LX
1....A....0....0
3....B....1....1
5....C....3....2
7....D....5....3
14...F....3....2
8....E....14...3
21...G....3....2
22...H....21...3
The PID in line 2 (value 1) follows the line with SID of 1 (line 1) and is at the first level (LX=1) in the tree. This is followed on line 3 with the first Level 2 record with PID=3 to correspond to the SID of line 2.

That pattern continues down the tree with each line increasing in Level (LX) until there are no more. Then, you'd look back up the tree for other records where the PID matches an SID on the next higher level or even higher if none found at that level.

You see this in line 5, when you get a second Level 2 record with PID=3 corresponding to the SID=3 on Level 1 in line 2.

I don't have any idea how to do this in a SELECT statement, however. :-)
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform