• Lynn Pettis (4/11/2013)


    autoexcrement (4/11/2013)


    Sorry, I would like to help, but there are just too many things about all of this that don't make sense to me.

    For example, why are you (seemingly) storing students more than once in the STUDENT table?

    If you alter your design so it is properly normalized, you will eliminate redundant and incoherent data, and it will vastly simplify your queries.

    Happens to be a normal occurance in a SIS apparently. It was when I worked at a school district. The student table had one (or more) records for each student enrolled for that school year.

    My question is what is the value of S.EndDate when this query was run.

    basically we capture changes during a year so Student table has multiple records.

    Start and EndDate is for that purpose of track those changes