Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count sql statement
Message
De
06/09/2002 08:12:02
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00696342
Message ID:
00697426
Vues:
9
>I have a table that has following itemno and positions.
>
>
>Itemno    Position
>
>0110.01   CPO
>0543.01   ACPO
>0543.02   ACPO
>0840.01   AC
>0840.02   AC
>3125.01   SC
>3180.10   WPT
>
>
>I am trying to to count distinct positions as follows:
>
>CPO  1
>ACPO 2
>AC   2
>SC   1
>WPT  1
>
>
>when I run this sql statement:
>
>
>SELECT DISTINCT cursor1.e_class FROM cursor1
>
Try
SELECT Position, count(*) as numoccurs from cursor1 group by position
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform