Hello,
I've got two tables :
tblTimetable : ClientID, Mon, Tue, Wed, Thu, Fri, Sat, Sun
tblTimetable_Timeslot : ClientID, TslotID
e.g:
tblTimetable :
ClientID Mon Tue Wed Thu Fri Sat Sun
404 10 2 20 0 0 0 0
tblTimetable_Timeslot :
ClientID TslotID
404 10
404 2
404 20
I'm trying to write a trigger on tblTimetable so that when Mon, Tue, Wed etc is changed to "0", the trigger looks up the appropriate record in tblTimetable_Timeslot and deletes it ! Thats it really, have never been good with Triggers
Any help would be greatly appreciated
Thanks

I've got two tables :
tblTimetable : ClientID, Mon, Tue, Wed, Thu, Fri, Sat, Sun
tblTimetable_Timeslot : ClientID, TslotID
e.g:
tblTimetable :
ClientID Mon Tue Wed Thu Fri Sat Sun
404 10 2 20 0 0 0 0
tblTimetable_Timeslot :
ClientID TslotID
404 10
404 2
404 20
I'm trying to write a trigger on tblTimetable so that when Mon, Tue, Wed etc is changed to "0", the trigger looks up the appropriate record in tblTimetable_Timeslot and deletes it ! Thats it really, have never been good with Triggers
Any help would be greatly appreciated
Thanks