DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How to UPDATE table_x inside a trigger that fires upon update of table_x ?

Threaded View

  1. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    To come back to your original question - I'm sure that you would not get a "loop" of updates, your trigger will fail with a "table is mutating" error.

    IF you can sort out the good from the bad updates (which is not sure since some front ends generate SET A=A updates) you could (perhaps):
    - rename table_x to table_x_base
    - create view table_x as select * from table_x_base
    - recompile 1'563 invalid objects
    - create an INSTEAD OF trigger on the view

    (Waiting to be told that's crazy.)
    Last edited by DaPi; 05-12-2006 at 10:46 AM.
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

Posting Permissions

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


Click Here to Expand Forum to Full Width