Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count(*)
Message
De
24/04/2001 13:46:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00499134
Message ID:
00499145
Vues:
26
>I have some code that looks like this:
>
>SELECT bank ,settdate, SUM(amount) AS amount, COUNT(*) AS Items ;
>FROM ncredit2 ;
>GROUP BY bank ;
>INTO TABLE nCredit_report
>
>For some reason SUM(amount) comes out to the right number but COUNT(*) give me the wrong number.
>
>There should be 24 records in the table. Count gives me only 22. Is it because two of the records amount field is equal to zero (0.00)?
>
>Thanks in advance for your help.
>
>Randall

The value of field shouldn't affect a COUNT(*)
There are probably 2 deleted records. In which case RECCOUNT() would be 24 (likewise the message in the status bar), but COUNT(*) would return 22.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform