-
Hi
---------------------------------
I have a table AAAA. On this table I have a befor update
trigger (AAAA_BU_STATUS) . In this trigger I have a
command with below syntax on updating (status)
select distict 'X'
from AAAA
wher year=:new.year and status=1;
---------------------------------
When I updateing status in FORM (On AAAA table) , I
get a mutating error.
I want check a request on AAAA brfor updateing AAAA.
Please help my
-
Hello,
Why You dont try to create this trigger
with a when clause eg:
create or replace trigger YOUR_TRIGGER before update of status on AAAA
for each row
when (new.year=old.year and new.status = 1)
begin
-- your code here
end;
Silas - silas.silva@tecmind.com.br
---------------------------------------
-
Why You dont try to create this trigger
with a when clause eg:
create or replace trigger YOUR_TRIGGER before update of status on AAAA
for each row
when (new.year=old.year and new.status = 1)
begin
-- your code here
end;
In last sample i've included then column status in before clause, but, i believe, to fire a trigger only in the records you want, You need to like this sample.
Silas - silas.silva@tecmind.com.br
---------------------------------------
-
create or replace trigger YOUR_TRIGGER before update on AAAA
for each row
when (new.year=old.year and new.status = 1)
begin
-- your code here
end;
Now, i'm sending the correct sample! without the column on before update clause!
Try, this! reply to me the result!
---------------------------------------
Silas - silas.silva@tecmind.com.br
-
"I want check a request on AAAA brfor updateing AAAA."
Those pesky triggers and mutation. You can't reference the table inside of the trigger. The table may be changing ("mutating") so Oracle doesn't let you look ("select") at it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|