CREATE OR REPLACE TRIGGER tri_1 BEFORE INSERT ON P_ENTERHALLLEADFLOW_CODES FOR EACH ROW WHEN(NEW.ID IS NULL)
BEGIN
SELECT SEQ_P_ENTERHALLLEADFLOW_CODES.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
/
sqlldr sh20000_wx/sh20000_wx log=1.log bad=1.bad discard=dis.log control=1.ctl
LOAD DATA
INFILE '1.text'
INFILE "2.txt"
APPEND
INTO TABLE P_ENTERHALLLEADFLOW_CODES
Fields terminated by","
TRAILING NULLCOLS
(
ID "SEQ_P_ENTERHALLLEADFLOW_CODES.NEXTVAL",
LEAD_CODE,
isvalid FILLER
)
CREATE INDEX IDX_lead_code ON P_ENTERHALLLEADFLOW_CODES(lead_code) tablespace TSH10000_WX;