Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting records using select-sql
Message
De
26/08/2004 05:11:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Counting records using select-sql
Divers
Thread ID:
00936513
Message ID:
00936513
Vues:
48
i have table with field status with values 1,2,3. i would like to count the # of records having the status 1, 2 and 3 and then put this in a cursor.

how will i be able to do this using SELECT-SQL? i thought of doing this,
select count(*) from mytable where status=1 into cursor csr1

select count(*) from mytable where status=2 into cursor csr2

select count(*) from mytable where status=3 into cursor csr3

select a.*, b.*, c.* from csr1 a, csr2 b, csr3 c into cursor csr4
is this the best solution?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform