[Solved] I have 3 table missing data find in SQL


If you cross join your Week and Student tables to get all combinations, and then use not exists to determine where no TimeSheet record exists.

select W.WeekID, S.StudentID
from [Week] W
cross join Student S
where not exists (select 1 from TimeSheet T where T.StudentID = S.StudentID and T.WeekID = W.WeekID);

0

solved I have 3 table missing data find in SQL