PDA

View Full Version : SQL Loader?



doitruong01
06-09-2004, 03:13
(^_^)
Hi all !
Mình muốn viết 1 script dùng SQL Loader để import data từ file Excel có bạn nào có ví dụ nào không chỉ cho mình với.
Thanks a lot !

finger
14-09-2004, 02:06
How does one use the SQL*Loader utility?
One can load data into an Oracle database by using the sqlldr (sqlload on some platforms) utility. Invoke the utility without arguments to get a list of available parameters. Look at the following example:
sqlldr scott/tiger control=loader.ctl
This sample control file (loader.ctl) will load an external data file containing delimited data:
load data
infile 'c:\data\mydata.csv'
into table emp
fields terminated by "," optionally enclosed by '"'
( empno, empname, sal, deptno )
The mydata.csv file may look like this:
10001,"Scott Tiger", 1000, 40
10002,"Frank Naude", 500, 20


---------------------------------------------
Hi vọng đúng cái bạn cần :D