Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OdciIndex - mode batch insert

User_05424Aug 11 2022

Hello
I work with the ODCIIndex database interface
Operation mode batch insert
Batch size is very small = 200 (or 55) records
My decisions
I accumulate data in a package variable and load
via JOB (could not determine the end of the operation)

What are the system solutions
How to determine the last package or last entry
I will attach the full code at your request.

Thanks
----------------------------------------------------------------------
Example

create or replace package Sv_Package as
function ReadItem(sItem in Sv_Indexlending) return Sv_Indexlending;
function SaveItem(sItem in Sv_Indexlending) return Sv_Indexlending;
end Sv_Package;
/
create or replace package body Sv_Package as
Item Sv_Indexlending;

function ReadItem(sItem in Sv_Indexlending) return Sv_Indexlending
is
begin
if Item is Null then Item:=Sv_Indexlending(0,Null); end if;
return Item;
end;

function SaveItem(sItem in .Sv_Indexlending) return Sv_Indexlending
is
begin
Item:=sItem;
return Item;
end;

end Sv_Package;

static function OdciIndexInsert (iA Sys.ODCIIndexInfo,RidList Sys.ODCIRidList,NewValList Sv_DateList, Env Sys.ODCIEnv) Return Number
is
begin
declare
I Integer;
S Boolean:=False;
L Sv_IndexLending;
begin
L:=Sv_Package.ReadItem(Null);
--Sv_WorkedJob('Create',L.ListRecord);
Sv_WorkedJob('Disable',Null);
for I in NewValList.First .. NewValList.Last loop
if Not NewValList(I) is Null then L.AddRecord(To_Char(NewValList(I),'DD-MM-YYYY')||RowIdToChar(RidList(I))); end if;
end loop;
L:=Sv_Package.SaveItem(L);
Sv_WorkedJob('Enable',L.ListRecord);
return ODCIConst.Success;
end;
end;

Comments

Post Details

Added on Aug 11 2022
0 comments
175 views