SQL*Loader with tab delimited data
From http://www.dba-oracle.com/t_sql_loader_tab_delimited_data.htm
Question: I want to use sqlldr (the SQL:*Loader) utility to load a tab delimited file. How do I specify a tab delimiter in SQL Loader control files?
Answer: Oracle SQL*Loader allows you to specify several variations of the tab character in the control files syntax. There are several ways to load table delimited data into Oracle.
In the control
file, you can specify a tab as a backslash t, one way to describe the tab
character:
fields terminated by
'\t'
Any character can be used as a delimiter and you can
specify it's hex representation in the SQL*Loader control file. The
hexadecimal 09 represents the tab character:
fields terminated by x'09'
To see working
examples of sqlldr control file delimiters, check out the code download in
the new book "Advanced Oracle Utilities", highly recommended to learning SQL*Loader
syntax.
TERMINATED [BY] { WHITESPACE | X'hexstr' | 'string' | EOF }
fields terminated by '\t'
terminater by X'09'
在CTL文件中直接输入tab键 也可以.
-- Oracle SQL*LOAD control file generated on 20:51:08 17 10? 2003 by DataStage(tm) ORABULK stage version 1.2 NLS map=MS1252
OPTIONS (ERRORS=99999999)
LOAD DATA
APPEND
INTO TABLE TB_SOC_LEVYAUTHINFO_TT
FIELDS TERMINATED BY ' '
TRAILING NULLCOLS
(LEVYAUTHINFOID CHAR,
....
PAYMENTTERM DATE "YYYY-MM-DD HH24:MI:SS" TERMINATED BY WHITESPACE
--"SVC_TYPE" DECIMAL EXTERNAL,
--"SVC_ID" CHAR,
--"USER_STATUS_CHNG_TIME" DATE "YYYY-MM-DD HH24:MI:SS",
)
浙公网安备 33010602011771号