declare
v_old_comment_user dss.disposition_details.comment_user%TYPE;
v_old_comment_date dss.disposition_details.comment_date%TYPE;
Cursor C1 is
select comment_user,comment_date
from dss.disposition_details
where id = :disposition_details.id
and action = 'R';
Begin
Open C1;
Fetch C1 into v_old_comment_user
,v_old_comment_date;
Close C1;
If v_old_comment_user is null and v_old_comment_date is null then
:disposition_details.comment_user := user;
:disposition_details.comment_date := sysdate;
Elsif v_old_comment_user != :disposition_details.comment_user then
:disposition_details.comment_user:= user;
ElsIf v_old_comment_date != :disposition_details.comment_date then
:disposition_details.comment_date := sysdate;
End if;
End;
ASKER
Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.
TRUSTED BY
If the last one is true verify the trigger fires (put a message after the begin and if it does fire put additional messages with the value of the items that matter to debug the problem), else give the error message for compile or runtime