SQL - Check Days Staff Rostered to the diary
v7,v6
Checked days that the staff is on the diary. It just checks for start time of midnight (as there should always be a not working time starting at midnight) select DM."Date", extract(weekday from DM."Date") "Weekday", DM."Start" , DM."Finish", ApT."Detail" "Appt Type" from "Diary_Main" DM join "Appointment_Types" Apt on ApT."Number" = DM."Apt_Type" where DM."Date" >= current_date and DM."Stf_Num" = 10000000178 //change staff number here and DM."Start" containing '00:00:00' and DM."Dry_Num" = 5 //change diary number here order by DM."Date"