Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counter for children in self-referential table
Message
 
 
À
21/08/2006 02:49:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01147193
Message ID:
01147235
Vues:
17
The solution you're refering to works in VFP9 only. So does your query.

>Just wondering quite recent solution for Thread #1147165
>may be altered to be used for self-referential table ( id , parent_id )
>
>
>select mytable.id,mytable.descript,step1.CountChildren from mytable ;
>inner join ;
>(select parent_id , count(*) as CountChildren from mytable group by parent_id ) step1 ;
>on mytable.id = step1.parent_id
>
>
>Statement above gives a syntax error
>
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform