Hi
I have two related tables where tblStaff.ID = tblStaffBookings.StaffID. How can I set triggers in tblStaffBookings that everytime a new StaffID is inserted or deleted from tblStaffBookings then tblStaff.Jobs is set to below count?
Thanks
Regards
I have two related tables where tblStaff.ID = tblStaffBookings.StaffID. How can I set triggers in tblStaffBookings that everytime a new StaffID is inserted or deleted from tblStaffBookings then tblStaff.Jobs is set to below count?
SELECT COUNT(ID) AS Jobs FROM tblStaffBookings GROUP BY tblStaffBookings.StaffID HAVING tblStaffBookings.StaffID = <RecentlyInsertedStaffID>
Thanks
Regards