Results 1 to 2 of 2

Thread: Trigger Help

  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Unanswered: Trigger Help

    How does one write an update trigger so that it only fires when a column (lets say Columnname for grins) is updated If Update(clolumnname) and is updated with a specific value. (Columnname = '1' for grins)

  2. #2
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Quote Originally Posted by nicks.dad
    How does one write an update trigger so that it only fires when a column (lets say Columnname for grins) is updated If Update(clolumnname) and is updated with a specific value. (Columnname = '1' for grins)
    Check the value of ColumnName from the inserted table. Remember, inserted is populated with both inserts and updates! For more info on the inserted and deleted tables, look them up under the triggers topic in BOL.

Posting Permissions

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