Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select
Message
De
11/05/1998 01:13:23
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:
00098422
Vues:
29
Jim,
The having clause is for restricting the query for DUPLICATE records only.
i.e the resultant record set would include only those values of 'cfieldname' which occur MORE than ONCE.

*---Ranjit

>>SELECT cfieldname, count(*) AS dup_num ;
>> FROM ctable ;
>> GROUP BY cfieldname ;
>> HAVING count(*) > 1 ;
>> INTO CURSOR ctempfile
>Ranjit,
>
>Out of curiosity, why the HAVING clause? By definition there will always be at least one record for each value of the field being grouped on. Doesn;t the HAVING clause just slow things down without improving anything, or am I missing something here?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform