Procedure ChkEffectDateOverlap(P_ACTIVE_DATE IN VARCHAR2,
P_INACTIVE_DATE IN VARCHAR2,
P_OUT OUT VARCHAR2) IS
v_count number;
BEGIN
select count(*)
into v_count
from Table A
where 1=1
and to_date(P_ACTIVE_DATE, 'MM/dd/yyyy') <= A.Inactive_Date
and to_date(P_INACTIVE_DATE, 'MM/dd/yyyy') >= A.active_Date;
if v_count > 0 then
select 'Effective Date Overlap' into P_OUT from dual;
else
select 'Success' into P_OUT from dual;
end if;
Exception
WHEN OTHERS THEN
select 'Error' into P_OUT from dual;
END;
- Apr 01 Thu 2021 15:30
(Oracle Package) 日期重疊檢查
close
文章標籤
全站熱搜
留言列表
禁止留言