create or replace package xxdmgl_daily_rates_pkg
is
procedure xxdmgl_daily_rates_p
(retcode out number,
errbuff out varchar2,
p_from_date date,
p_to_date date);
end xxdmgl_daily_rates_pkg;
create or replace package body xxdmgl_daily_rates_pkg
is
procedure procedure xxdmgl_daily_rates_p
(retcode out number,
errbuff out varchar2,
p_from_date date,
p_to_date date)
is
cursor c1
is
select *
from xxdmgl_daily_rates_t;
begin
for i in c1
loop
insert into gl_daily_rates_interface (from_currency,
values (i.from_currency,
i.to_currency,
p_from_date,
p_to_date,
I.conversion_type,
i.conversion_rate,
'I');
end loop;
end;
end xxdmgl_daily_rates_pkg;
DECLARE
retcode VARCHAR2(222);
errbuff VARCHAR2(222);
BEGIN
xxdmgl_daily_rates_pkg. xxdmgl_daily_rates_p (retcode,errbuff ,sysdate,sysdate);
COMMIT;
END;
SELECT * FROM GL_DAILY_RATES where trunc(CONVERSION_DATE)=trunc( sysdate);