[AccessD] New SQL Question

paul.hartland at fsmail.net paul.hartland at fsmail.net
Wed Mar 31 04:31:54 CST 2004


Martin,
 
Could try something like to following:
 
SELECT StudentID, Count(Exam) As Exams, Count(Pass) As ExamsTaken 
FROM YourTable
GROUP BY StudentID
HAVING (((Count(Pass)) Is Not Null))
 
Paul






Message date : Mar 31 2004, 11:19 AM
>From : "Martin Reid" 
To : "Access Developers discussion and problem solving" 
Copy to : 
Subject : [AccessD] New SQL Question
Heres the record

ID 2003001
A 12.9
B 15.4
C1 12.5
D1 10
C2 Null
D2 12.9

Given the above how do I get a count for ID 2003001 of 5 indicating that the
student sat 5 exams out of the possible 6.

The Null indicates that the student did not sit that exam.

Not my DB and I cant change anything re structure etc

Martin

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
Freeserve AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month 
www.freeserve.com/anytime


More information about the AccessD mailing list