Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hierarchal Query
Message
 
 
To
17/09/2007 03:13:15
Prashant Dongare
Micropro Software Solutions
Nagpur, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01254632
Message ID:
01255056
Views:
9
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform