快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

sqlldr相关

--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 #######################################################################################



分享文章:sqlldr相关
当前URL:http://6mz.cn/article/jhcscs.html

其他资讯