Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select
Message
De
08/05/1998 09:13:17
Ranjit Londhe
Anglo Eastern Ship Mgmt Ltd.
Mumbai, Inde
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00098004
Message ID:
00098024
Vues:
58
Matt,
Try this :

SELECT cfieldname, count(*) AS dup_num ;
FROM ctable ;
GROUP BY cfieldname ;
HAVING count(*) > 1 ;
INTO CURSOR ctempfile

The resultatnt set should show one row for each unique 'cfieldname' value and the corresponding count.

HTH,
Ranjit.

>If I have a table that has 20 records in it, and the first 10 store the number 1 and the second 10 store the number 2 in it. Is there any way to use the SQL Select statement to count the number of occurences of 10 and 20 in one statemnet? Or do I have to use a calculate cnt() statement twice, once for 10 and once for 20.
>
>Thanks,
>Matt
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform