Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Data Sources
Message
From
09/08/2000 20:16:35
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
09/08/2000 14:55:49
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00402582
Message ID:
00403169
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform