Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2014
    Posts
    4

    Unanswered: Trigger to update the same table

    Hi

    I have a problem, I want to create a trigger to check before update that an action event has been marked as COM and if so I want to update all of the related events (have the action ref) in the same table as CAN (if they are CUR).

    When trying to do this I get an error saying this is a mutating trigger and fails.

    Is there a way around this?

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down

    Quote Originally Posted by mds1256 View Post
    Hi

    I have a problem, . . . E t c

    Is there a way around this?
    Yes, your design is flawed, change it.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Is there a way around this?
    do not use any trigger
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Apr 2014
    Posts
    4
    I am in a restrictive situation, it is a closed system and I only have access to the database so I am trying to figure out a way to achieve what I need to.

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    A mutating table, eh? There are ways to workaround the problem; have a look here.

Posting Permissions

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