Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: Termination Trigger

    help again pls. I have a sql database with access for client gui. In it are two tables one table serves as the main form(Active table) the other as the subform(employeeDocs) they are related. I also have a termination table which a trigger that I created I created updates from the active table. Now I need to tell the trigger to delete these terminated records after updating the terminated table. heres my code

    CREATE TRIGGER TerminationUpdateTrigger ON EmployeeGamingLicense
    FOR UPDATE
    AS
    INSERT INTO TERMINATION(Status,[TM #],LastName, FirstName, [SocialSecurityNumber], DateHired, Title)
    SELECT STATUS, [TM#], LASTNAME, FIRSTNAME, [SSN#], HIREDATE, JOBTITLE
    FROM Inserted
    WHERE STATUS = 'TERMINATED'

    how would i go about doing that?? I keep getting error messages

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I answered that question before you asked it....

    http://www.dbforums.com/t1003767.html
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Doh

    sorry Brett your right, and since the subform table is linked then those records will get deleted along with the primary tables.. Sorry

  4. #4
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    OK Nm

    and I just realized why my terminationtrigger to delet was not working so nevermind sorry to waste anyones time, didnt need post after all

    sorry again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •