Experts,
Am currently working on Oracle 11.2.0.3. Have created a stored Procedure which will directly load the data into a table by SELECTing the data from multiple tables.
here is my Prcedure
<code>
create or replace procedure proc1
as
begin
insert into SRP.RPT_DATA
(
col1,
col2,
....
...
colN
)
select a.col1, a.col2,b.col3,.....colN
from TABLE1 INNER JOIN TableB on <>
LEFT OUTER JOIN TABLE3 on <>
LEFT OUTER JOIN TABLE4 on <>
WHERE TableB.COL=<>;
COMMIT;
if sql%rowcount =0 then
raise no_data_found;
end if;
end;
</code>
Now , I would like to write a Procedure for Incremental load. Can you please advise the logic to implement/provide any sample/can I add any additional logic in the above Procedure.
Thanks
Amy