Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SELECT (*) with COUNT(*)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00387199
Message ID:
00387229
Vues:
17
Hi Chuck,
What about :

SELECT MyTable.field1,MyTable.Field2,Count(Mytable.Field1) as cntField1 ;
FROM table1 ;
GROUP BY table.field1 ;
INTO Cursor MyCursor

Your solution is the "GROUP BY" clause

>Is there a way to run an SQL SELECT and get ALL the rows of data and still get a COUNT(*)? I have tried this, but it looks like like I'm just getting the last row of data along with the count. TIA, Chuck.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform