Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Question
Message
 
 
À
27/07/1998 15:57:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00121732
Message ID:
00121761
Vues:
15
That gets me close to where I need to be. The problem is that the zones are customizable and the classes are customizable. I'm trying to get a report that has the zones down one side and the classes across the top with all the counts filled in.

If I can get it into the right shape for the cross tab program then I'm home free. (I made a program that will programatically do a report from a cross tab table)

You've got me close... I just need to get all of the classes listed for each zone and I think I've got it.

The good thing is that once I get an SQL statement that gets the data ready for the cross tab program, I can go from one table to a unknown by unknown report. That'll be useful for a lot of reports.

Thanks for all your help,

-Michelle


>Select Zone,Class,count(*) as counter From Table1 ;
>Into Cursor tmp nofilter ;
>Group by Zone,Class
>
>Select zones.Zone,tmp.Class,tmp.counter From zones,tmp ;
>Where zones.zone=tmp.zone ;
>Union All Select zone,"" as class, 0 as counter From zones ;
>Where zones.zone Not In (Select zone from tmp)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform