• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Mutating Problem

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I am having a mutating problem while updating a
table, there is after row trigger while updating the sal column, thats the general view of the problem:
e.g
when anyone update the salary column of emp table, its ename is changed into the User Id.
Can anyone know how to resolve the problem
Thanx & Regards
Marium
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Make a package
2. Declare a PL/SQL table in which you can store the PK of the table.
3. On the after-ROW trigger fill the PL/SQL table
4. On the after-STATEMENT trigger read the PL/SQL table and do your stuff.
Note however that you cannot use the :new and ld variables now.
Note also that you can really really easy make endless loops that update the same rows again and again if you don't think about it
 
Marium Hasan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying.
that means Oracle doesn't give any direct solution for the Mutating Problem, Youu have to resolve it through programming.
Thanks Again
Marium
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic