溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

sqlldr相關(guān)

發(fā)布時(shí)間:2020-08-11 18:58:37 來(lái)源:ITPUB博客 閱讀:162 作者:正月十七 欄目:關(guān)系型數(shù)據(jù)庫(kù)
--DROP SEQUENCE SEQ_P_ENTERHALLLEADFLOW_CODES;
CREATE  SEQUENCE SEQ_P_ENTERHALLLEADFLOW_CODES START WITH 1 CACHE 100;


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;

sqlldr tt/tt log=1.log bad=1.bad discard=dis.log control=11.ctl

dos2unix
===========================
# crm start #####################################################################################
#
# interface
rm -f de_bst_interface.txt
cat /oradata2/share_interface/hmbst/in/97SI*.txt >de_bst_interface.txt
mv  /oradata2/share_interface/hmbst/in/97SI*.txt /oradata2/share_interface/hmbst/arch
sqlldr userid=add114/add114 control=de_bst_interface.ctl log=log/de_bst_interface_$TIME.log errors=1000 bad=de_bst_interface_$TIME.bad
#
# details
rm -f de_bst_details.txt
cat /oradata2/share_interface/hmbst/in/97SD*.txt >de_bst_details.txt
mv  /oradata2/share_interface/hmbst/in/97SD*.txt /oradata2/share_interface/hmbst/arch
sqlldr userid=add114/add114 control=de_bst_details.ctl log=log/de_bst_details_$TIME.log errors=1000 bad=de_bst_details_$TIME.bad
#
# bad
cp de_bst_interface*.bad /oradata2/share_interface/hmbst/bad
cp de_bst_interface*.bad /oradata2/share_interface/hmbst/arch
rm -f de_bst_interface*.bad
cp de_bst_details*.bad /oradata2/share_interface/hmbst/bad
cp de_bst_details*.bad /oradata2/share_interface/hmbst/arch
rm -f de_bst_details*.bad
#
# crm end #######################################################################################


向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI