Hunting down duplicates

  • Thread starter Matt Hohmeister
  • Start date
M

Matt Hohmeister

Hello--

I have a query that creates report card records for a high school. The query
creates one record per student/period combo, with these fields:

SID (Student ID number, 9 digits)
FullName
Grade
Password (for Basmati online grade retrieval system)
CC (course number, 11 digits)
FullGrade (ie, "100 A+")
Instructor (teacher name)
Period (ie, "5")
CourseName (ie, "Term 3: 5-World History")

The problem is that, when students change classes midyear, some teachers
forget to update their gradebooks appropriately, and students wind up with
(ie) two each first and fifth period classes on their report card.

I'd like to do a query that will list only those above records where there's
a match for SID and Period.

Help!

Thanks :)
 
D

Dale Fye

Matt,

Try:

SELECT *
FROM yourQuery
GROUP BY SID, Period
HAVING Count(SID) > 1

HTH
Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top