Answer the question
In order to leave comments, you need to log in
How to merge tables with empty fields?
Hello!
I combined the tables of omissions and tardiness, the data comes out on those who were late and missed, but those students who were not late at all and did not miss are also needed.
Dbo_grades.gradename SELECT, dbo_students.studentname, dbo_days.Day, dbo_absents.absent
FROM dbo_grades INNER JOIN (dbo_students INNER JOIN (dbo_days INNER JOIN dbo_absents dbo_days.id_day = dbo_absents.am_day ON) ON = dbo_students.id_students dbo_absents.studentid) dbo_grades ON. id = dbo_students.gradeid
UNION ALL
SELECT dbo_grades.gradename,dbo_students.studentname, dbo_days.Day,dbo_lates.late
FROM dbo_grades INNER JOIN (dbo_students INNER JOIN (dbo_days INNER JOIN dbo_lates ON dbo_days.id_day = dbo_lates ON.dam_day) dbo_lates.studentid) ON dbo_grades.id = dbo_students.gradeid
UNION ALL SELECT dbo_grades.gradename,dbo_students.studentname, dbo_days.Day,dbo_medical.medical
FROM dbo_grades INNER JOIN (dbo_students INNER JOIN (dbo_days INNER JOIN dbo_medical ON dbo_days.id_day = dbo_medical.am_days) ON dbo_students.id_students = dbo_medical.studentid) ON dbo_grades.id = dbo_students.gradeid;
Answer the question
In order to leave comments, you need to log in
SELECT ...
FROM students
WHERE id_students NOT IN (
SELECT DISTINCT studentid FROM absents
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question