2007年1月29日 星期一

SQLLDR Note --Import Flat Data into Oracle DB

http://http://www.orafaq.com/faq/sql_loader

There are some resources for using SQL loader.

For Example:

* Data File (A0001.txt)

C0001 CUSTA
C0002 CUSTB
C0003 CUSTC
C0004 CUSTD
... ...


* Control File (r11i.ctl)

LOAD DATA
INFILE 'A0001.txt'
INTO TABLE XX_CUST_TEMP
FIELDS TERMINATED BY " " optionally enclosed by '"'
(customer_number, customer_name, sales CONSTANT 'S22')


* SQLLDR Syntax

sqlldr apps/apps control=r11i.ctl

沒有留言: