Results 1 to 2 of 2

Thread: Triggers

  1. #1
    Join Date
    Aug 2008

    Unanswered: Trigger on Column Update


    I have the following table:

    Articles (ArticleID, ArticleType, ArticleName, ArticleText, ArticleViewCount)

    I'm trying to create a trigger that will execute everytime ArticleViewCount is updated (incremented) for any record. ArticleViewCount is automatically updated by the KB solution everytime the article is viewed. The trigger is supposed to insert a record into the following table for the record that was updated:

    Article_Stats (StatID, ArticleID, ViewDate, ViewCount)

    This is to monitor Article usage for a KB.
    Any suggestions are greatly appreciated,

    Last edited by ozzy0217; 08-15-08 at 20:54. Reason: title clarification

  2. #2
    Join Date
    Jul 2003
    San Antonio, TX
    Instead of creating a trigger, you can modify the procedure that issues an UPDATE, and add an INSERT into your Article_Stats right from there.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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