you cannot use comparisons like
if clob_column_1 = clob_column_2
use dbms_lob.compare
Printable View
you cannot use comparisons like
if clob_column_1 = clob_column_2
use dbms_lob.compare
begin
if inserting then
INSERT INTO tblworkingcontentversion (idworkingcontentversion,content,IdWorkingContent,IdUser,MinorVersion, idDocument) values
(sq_tblwcontvers.nextval,:new.content,:new.idworkingcontent,:new.iduserwhocreate,1,:new.iddocument);
end if;
if UPDATING then
if dbms_lob.compare(:new.content,:old.content,30000,1,1)<>0 then
INSERT INTO tblworkingcontentversion (idworkingcontentversion,Content,IdWorkingContent,IdUser, idDocument) values
(sq_tblwcontvers.nextval,:new.content,:old.idworkingcontent,:old.iduserwhocreate,:old.iddocument);
end if;
end if;
end;
It doesn't work.
Please if u can write some code it would help so much.
I want a trigger that triggers when only the content (clob field)
updates and I am not managing to do that.