Skip to Main Content

APEX

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!

Batch ID for Data Load

Idkfa2Feb 15 2018 — edited Apr 17 2018

Hello,

Can someone help me with a trigger that will generate a batch ID per load when using Data Load?

I searched through the boards and I found one related to SQL Loader. I'm on apex 5.1.3

I have this but it don't want it to list count starting with 1 and ascending. I'd like it to display 1 for LOAD_ID for all rows when a batch gets uploaded and then 2 for a second batch ect.

create sequence load_id_seq;

create or replace trigger "BI_LOAD_ID"
  before insert or update on "BLOOD_BANK"
  for each row
begin
   if :NEW.LOAD_ID is null then
     select LOAD_ID_SEQ.nextval into :NEW.LOAD_ID from sys.dual;
  end if;
end;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2018
Added on Feb 15 2018
8 comments
1,930 views