Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Data Sources
Message
De
09/08/2000 20:16:35
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
09/08/2000 14:55:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00402582
Message ID:
00403169
Vues:
14
Kris,

SELECT ... SUM(IIF(Carrier = "46", 1, 0) AS nNumberOfRecords

If you are using ANSI SQL-92, use

SELECT ... SUM(CASE WHEN Carrier = "46" THEN 1 ELSE 0 END) AS nNumberOfRecords

The ANSI SQL is a good idea if you ever expect to upsize to an SQL database.


>Your solution has proved very usefull but I've run into another problem. In the select statement under the Count clause (Count(*) As nNumberOfRecords) can I include an expression that would filter certain entries.
>
>I was thinking about using something to the tune of:
>
> Count(*) for carrier="46" as nNumberOfRecords
>
>but that hasn't worked.
>
>Any suggestions?
>
>Thanks
>Kris H
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform