Implementation of SQL LOADER utility
Implementation of SQL LOADER utility
SQL> select count(*) from TVS.TM_SHP_CONFGR;
COUNT(*)
----------
49
SQL> desc TVS.TM_SHP_CONFGR
Name Null? Type
----------------------------------------- -------- ----------------------------
MST_MODE NOT NULL VARCHAR2(10)
EQP_ID VARCHAR2(50)
ORD_SHP_FROM_LOC_CD NOT NULL VARCHAR2(18 CHAR)
DEST_CD VARCHAR2(18 CHAR)
MDL_ID VARCHAR2(10 CHAR)
EQMT_TYP_CD VARCHAR2(20 CHAR)
SRVC_CD VARCHAR2(16 CHAR)
CARR_CD VARCHAR2(64 CHAR)
CNSLDT_CLS VARCHAR2(120 CHAR)
ITNRY VARCHAR2(60 CHAR)
MOD VARCHAR2(38 CHAR)
LAST_CHG_BY_USER_NM NOT NULL VARCHAR2(30)
LAST_CHG_DT_TM NOT NULL DATE
PROD_DESC VARCHAR2(80 CHAR)
NEW_ORIG_FAC_CD VARCHAR2(18 CHAR)
MIN_WIDE NOT NULL NUMBER(10,3)
MAX_WIDE NOT NULL NUMBER(10,3)
POENT VARCHAR2(10 CHAR)
TERM_OVRD_FLG VARCHAR2(1 CHAR)
$ vi new_rec_append.ctl
load data
infile '/home/smt/data/new_records.txt'
append
into table append_exam
fields terminated by ","
( name, phone )
$ sqlldr scott/tiger control=/home/smt/data/new_rec_append.ctl
$vi file_append.ctl
load data
infile '
append
into table TVS.TM_SHP_CONFGR
fields terminated by ","
(MST_MODE,EQP_ID,ORD_SHP_FROM_LOC_CD,DEST_CD,MDL_ID,EQMT_TYP_CD,SRVC_CD,CARR_CD,CNSLDT_CLS,ITNRY,MOD,LAST_CHG_BY_USER_NM,LAST_CHG_DT_TM,PROD_DESC,NEW_ORIG_FAC_CD,MIN_WIDE,MAX_WIDE,POENT,TERM_OVRD_FLG)
DEFINE _CONNECT_IDENTIFIER = "CLSST02" (CHAR)
SQL> select count(*) from TVS.TM_SHP_CONFGR;
COUNT(*)
----------
49
SQL> desc TVS.TM_SHP_CONFGR
Name Null? Type
----------------------------------------- -------- ----------------------------
MST_MODE NOT NULL VARCHAR2(10)
EQP_ID VARCHAR2(50)
ORD_SHP_FROM_LOC_CD NOT NULL VARCHAR2(18 CHAR)
DEST_CD VARCHAR2(18 CHAR)
MDL_ID VARCHAR2(10 CHAR)
EQMT_TYP_CD VARCHAR2(20 CHAR)
SRVC_CD VARCHAR2(16 CHAR)
CARR_CD VARCHAR2(64 CHAR)
CNSLDT_CLS VARCHAR2(120 CHAR)
ITNRY VARCHAR2(60 CHAR)
MOD VARCHAR2(38 CHAR)
LAST_CHG_BY_USER_NM NOT NULL VARCHAR2(30)
LAST_CHG_DT_TM NOT NULL DATE
PROD_DESC VARCHAR2(80 CHAR)
NEW_ORIG_FAC_CD VARCHAR2(18 CHAR)
MIN_WIDE NOT NULL NUMBER(10,3)
MAX_WIDE NOT NULL NUMBER(10,3)
POENT VARCHAR2(10 CHAR)
TERM_OVRD_FLG VARCHAR2(1 CHAR)
$ vi new_rec_append.ctl
load data
infile '/home/smt/data/new_records.txt'
append
into table append_exam
fields terminated by ","
( name, phone )
$ sqlldr scott/tiger control=/home/smt/data/new_rec_append.ctl
$vi file_append.ctl
load data
infile '
append
into table TVS.TM_SHP_CONFGR
fields terminated by ","
(MST_MODE,EQP_ID,ORD_SHP_FROM_LOC_CD,DEST_CD,MDL_ID,EQMT_TYP_CD,SRVC_CD,CARR_CD,CNSLDT_CLS,ITNRY,MOD,LAST_CHG_BY_USER_NM,LAST_CHG_DT_TM,PROD_DESC,NEW_ORIG_FAC_CD,MIN_WIDE,MAX_WIDE,POENT,TERM_OVRD_FLG)
DEFINE _CONNECT_IDENTIFIER = "CLSST02" (CHAR)
Comments
Post a Comment