November 22nd, 2003, 04:48 PM
Problem Implementing Relational Trigger
I'm having difficulty implementing a trigger in which I am trying to make sure that no trainee is registered as being present for a class at the same time as another class already registered for, in other words no trainee can be in more than 1 place simultaneously.
The tables which the trigger is based around are:
Any ideas on what query I need to perform to get the correct behaviour?
Last edited by markb_1984; November 24th, 2003 at 03:59 AM.
November 24th, 2003, 03:59 PM
could you create a UNIQUE constraint on [traineeno] AND [time] ?
November 25th, 2003, 07:55 AM
Sorted it out using an IF EXISTS and linking class and register on classno and inserted and class on traineeno.