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;