触发器将如何在两个时间之间插入?插入时出现条件character to number conversion
错误。if
下面是我的触发器。
create or replace trigger TRI_INSERT
after insert on stud_details
referencing old as old new as new
for each row
declare
strTime varchar2(20) := :new.time_stamp; -- (eg: '02/08/2013 11:09:42 PM')
begin
if (to_char(strTime, 'hh24:mi:ss') between '22:00:00' and '23:59:59') then
insert into stud_clas_details
(id,
v-id,
w-id,
al_id,
time,
Time_Stamp)
values
(seq_ve_id.nextval,
:new.vehicle_id,
:new.way_id,
'xxxx',
strTime,
sysdate);
end if;
end TRI_INSERT;