Hi All,
I want to access new value after upadate in statement level trigger.
But in my query I am getting old values.
Here is the Trigger Code:
CREATE OR REPLACE TRIGGER TEST_TRIGGER
AFTER UPDATE OF col3 on table_gyan
DECLARE
PRAGMA AUTONOMOUS_TRAN SACTION;
v_count NUMBER:=0;
v_temp_count NUMBER:=0;
BEGIN
SELECT Count(1) into v_count from table_gyan where col3='Y';
If v_count>0 THEN
SELECT COUNT(1) INTO v_temp_count from TRIGGER_TABLE;
if v_temp_count>0 THEN
UPDATE TRIGGER_TABLE SET ACTION='START';
COMMIT;
else
insert into TRIGGER_TABLE(A CTION) values('START') ;
commit;
end if;
END IF;
END;
.
Now when ever I am executing this query
update table_gyan set col3='Y'
where col1='3'
and col2='100'
Its not doing anything with TRIGGER_TABLE.
Please help me how to do it.
Regards,
Gyanendar
I want to access new value after upadate in statement level trigger.
But in my query I am getting old values.
Here is the Trigger Code:
CREATE OR REPLACE TRIGGER TEST_TRIGGER
AFTER UPDATE OF col3 on table_gyan
DECLARE
PRAGMA AUTONOMOUS_TRAN SACTION;
v_count NUMBER:=0;
v_temp_count NUMBER:=0;
BEGIN
SELECT Count(1) into v_count from table_gyan where col3='Y';
If v_count>0 THEN
SELECT COUNT(1) INTO v_temp_count from TRIGGER_TABLE;
if v_temp_count>0 THEN
UPDATE TRIGGER_TABLE SET ACTION='START';
COMMIT;
else
insert into TRIGGER_TABLE(A CTION) values('START') ;
commit;
end if;
END IF;
END;
.
Now when ever I am executing this query
update table_gyan set col3='Y'
where col1='3'
and col2='100'
Its not doing anything with TRIGGER_TABLE.
Please help me how to do it.
Regards,
Gyanendar
Comment