Jump to content

Compare Date in Trigger


Akasha

Recommended Posts

Hello i have a trigger see code

create or replace trigger t_xtt_bbpodlvrbefore update on bbpodlvrfor each row begin if :new.exped_date != :old.exped_date then insert into test_ls values(:new.exped_date,:old.exped_date,'VERSCHIL','VERSCHIL'); end if;end;/
My new value has a date and my old value is empty, but for some reason he doesn't create the record in Test_ls.As soon as the old date is filled and the new one also its working fine.The problem only occurs when the old value is emptyi also tried the following if statement
if :new.exped_date != nvl(:old.exped_date,' ') then
Does anybody has an idea??
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...