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--