Hello, I have a MSSQL database with a table called "people" and a table called "attendance". The people table contains the person's ID (primary key, identity increment), last name, first name, and active fields (I would only be interested in grabbing fields where active = Yes). The attendance table contains a primary key ID field (again, set as identity with auto increment), a person_id field (which is the same as the unique ID assigned to the person in the people table), and fields for date, time, and attendance (which is Yes or No).
Because of how the system is set up, the attendance table can have multiple rows for the same person for the same event. Let's say John Doe was assigned to attend an event on 7-1-12 at 9am. Then that same info was loaded into the table 3 more times. On the last load, however, the attendance field changed and was set to 'No'. Now there are 4 rows for John Doe, for the same date, same event, but I only need to grab the row that was most recently added, which in this case has his attendance set to No. I also need to grab his last name and first name from the people table so I can display it. I've tried everything I can think of, but can't get this to go.