Trigger code

Results 1 to 4 of 4

Thread: Trigger code

  1. #1
    Mauricio C Guest

    Default Trigger code

    &nbsp;<BR><BR> Hello all, I&#039ve been looking for trigger code, but I&#039m haven&#039t been able to find anything else than troubleshooting.<BR><BR><BR><BR> I&#039m trying to make a trigger that&#039ll fire an stored procedure everytime a table is updated. BUT only if a specific column is changed into a specific value.<BR>E.G. let&#039s say I&#039m working on a project about soccer.. so I have a table named MATCHES (with a local team ID, and a visitor team ID and final score AND STATUS) if the status is notPlayed, then no prob.<BR> But once the status is changed from notPlayed to Played, I need to sum up the finalScore and insert it into another table.<BR>How do I go about it? <BR><BR>Thanks a lot!<BR><BR>(inserting is part of the stored procedure, not the trigger!)

  2. #2
    Jack P. Guest

    Default What DBMS?

    What DBMS are you using? Check the books online for your DBMS.

  3. #3
    Mauricio C. Guest

    Default SQLsrvr 7.0

    I&#039m on SQL srvr 7.0, and I&#039m missing the BOL&#039s. Can you help me?

  4. #4
    Mauricio C. Guest

    Default I still need help.

    &nbsp;<BR> I found the BOL&#039s and I&#039m working on my trigger, but how can I make sure that the column was updated to that ONE value?<BR><BR><BR><BR>I must NOT trigger the SP if the column value was changed to something else..<BR><BR><BR><BR>Thanks a lot.

Posting Permissions

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