I am currently working on fingerprint-based student attendance system. I am using Arduino Uno and fingerprint sensor to get student attendance record and store in SQL Server. I have a table called Attendance in my database which is storing student attendance records.But I have a problem with that.
Lets say Student A is absent today, the attendance record will not be stored in table Attendance for Student A. Meaning that I can only show students who are present to school today, the attendance record for Student A cannot be shown to the teachers.
Teachers can only view student attendance record after selecting the date, Student A attendance record cannot be seen by teachers cause there is no records for Student A in table Attendance
So How can I solve this? Any suggestion or reference? Your help is appreciated. Thank you
Assuming you're passing in the date as a parameter, you can just
left outer jointo the attendance table, and put the date check in theonclause (as opposed to thewhereclause. Putting it in thewhereclause effectively turns aleft outer joininto aninner join, due to the order in which the query is parsed and executed.