Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hierarchal Query
Message
 
 
À
17/09/2007 03:13:15
Prashant Dongare
Micropro Software Solutions
Nagpur, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01254632
Message ID:
01255056
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
VFP does not support hierarchical queries. You'll have to do that using procedural code.

>I am fixed in this perticular situation, where I want to retrive Hierarchal data from the following table.
>
>
>Field Name      Type                Width
>LVLCODE         Numeric                 2
>PRCODE          Numeric                 2
>NAME            Character              20
>
>
>
>In Oracle I use the following Query to traverse the data from root to the last child.
>
>
>
> SELECT LPAD(' ',3*LVLCODE) || Name,
>         LVLCODE, PRCODE
> FROM   LEVELMST
> CONNECT BY PRIOR LVLCODE = PRCODE
> START WITH PRCODE = 0
>
>
>
>To traverse from child to root the query in Oracle is
>
>
>
> SELECT LPAD(' ',3*LVLCODE) || Name,
>         LVLCODE, PRCODE
> FROM   LEVELMST
> CONNECT BY LVLCODE = PRIOR PRCODE
> START WITH LVLCODE = 17
>
>
>
>Please help me with these queries in VFP.
>Thanks in advance.
>
>Regards
>Prashant
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform