count report 
Author Message
 count report

in vb6 report
i have a table named  publisher
with fields lname,fname,status,city...
i am doing  a summary report
# of people from city=Chicago
# of people from city=London
# of people with status=1
each report works
but how do i write one SQL stament to do this report

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 07 Jul 2002 03:00:00 GMT  
 count report
Hopefully, you have some sort of primary key on this table.  For the
purposes of this example, I will operate on the assumption that you have a
primary key field called Index.  Something like this should produce the
results you seek.

SELECT publisher.city, Count(publisher.Index) AS [Number of people] FROM
publisher WHERE (((publisher.city)="chicago") AND ((publisher.status)=1)) OR
(((publisher.city)="london") AND ((publisher.status)=1))
GROUP BY publisher.city

HTH
Craig Hunt, MCSE
AISA Logic, Inc.
http://aisalogic.com

Quote:

> in vb6 report
> i have a table named  publisher
> with fields lname,fname,status,city...
> i am doing  a summary report
> # of people from city=Chicago
> # of people from city=London
> # of people with status=1
> each report works
> but how do i write one SQL stament to do this report

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Tue, 09 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Counting Report Pages In CR Viewer

2. Page count on report

3. Counting slashes in a report

4. Count in Reports on end of Group.

5. Display count of records in a report?

6. Counting subreports in a report

7. Vba summary counts sent directly to a report?

8. Using Count in reports

9. Counting Groups in Reports

10. Counting and Report

11. How to use Count in section of report

12. Word 97 Report template and Counting print area in Excel

 

 
Powered by phpBB® Forum Software