[AccessD] New SQL Question

Martin Reid mwp.reid at qub.ac.uk
Wed Mar 31 04:38:44 CST 2004


Thanks Paul we got it worked out after sending the email.


Best Wishes

Martin



----- Original Message ----- 
From: <paul.hartland at fsmail.net>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Wednesday, March 31, 2004 11:31 AM
Subject: Re: [AccessD] New SQL Question


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
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list