Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to insert a counter column
Message
From
07/02/2004 04:03:51
 
 
To
06/02/2004 15:33:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00874799
Message ID:
00875111
Views:
19
I noticed that you are joining TEST2 with TEST2 (the same child table).
The tables were very simple representation of parent-child relation and
I also need other columns from the header (TEST1).


Simply
SELECT T0.fld1,....,T1.cfld1 ,COUNT(*) ;
FROM test1 ;
JOIN test2 T1 ON T1.fld1=T0.fld1 ;
JOIN test2 T2 ON T1.fld1=T2.fld1 AND T1.cfld1=>T2.cfld1 GROUP BY 1,2..
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform