--BICP展示的存储过程运用函数:fc_sys_get_part_min
create or replace function fc_sys_get_part_min(id_sysdate in date)
return varchar2 is
vi_temp number(2);
vv_return varchar2(2);
begin
vi_temp := to_char(sysdate, 'mi');
select case
when vi_temp >= 0 and vi_temp <= 14 then
'44'
when vi_temp >= 15 and vi_temp <= 29 then
'59'
when vi_temp >= 30 and vi_temp <= 44 then
'14'
when vi_temp >= 45 and vi_temp <= 59 then
'29'
end
into vv_return
from dual;
return(vv_return);
end fc_sys_get_part_min;