Professional Documents
Culture Documents
sql loader
oracle
exp imp
oracle
sql loader
C:\>sqlldr
()
( 50)
( FALSE)
( FALSE)
( 1048576)
PLEASE NOTE:
'sqlload
scott/tiger foo'; 'sqlldr control=foo
userid=scott/tiger'.
,
'sqlldr scott/tiger control=foo logfile=log',
'sqlldr scott/tiger control=foo log',
'log'
C:\>
sql loader
aSQLLoader Excel Oracle
1. SQL*Loader , C:\
input.ctl
load data
infile 'test.txt'
append into table test
fields terminated by X'09'
(id,username,password,sj)
--1
--2 test.txt
--3 test
--4 X'09'TAB
-----
ainsert
bappend
creplace
dtruncate
DOS SQL*Loader
input.log
input.bad
2.
EXCEL CSV(*.csv),
LOAD DATA
INFILE 'd:\car.csv'
APPEND INTO TABLE t_car_temp
FIELDS TERMINATED BY ","
(phoneno,vip_car)
1 test.ctl
-- The format for executing this file with SQL Loader is:
-- SQLLDR control=<filename> Be sure to substitute your
-- version of SQL LOADER and the filename for this file.
LOAD DATA
INFILE *
BADFILE 'C:\Documents and Settings\Jackey\\WMCOUNTRY.BAD'
DISCARDFILE 'C:\Documents and Settings\Jackey\\WMCOUNTRY.DSC'
INSERT INTO TABLE EMCCOUNTRY
Fields terminated by ";" Optionally enclosed by '"'
(
COUNTRYID NULLIF (COUNTRYID="NULL"),
COUNTRYCODE,
COUNTRYNAME,
CONTINENTID NULLIF (CONTINENTID="NULL"),
MAPID NULLIF (MAPID="NULL"),
CREATETIME DATE "MM/DD/YYYY HH24:MI:SS" NULLIF (CREATETIME="NULL"),
28;"CH";"Switzerland";3;84;"09/30/2004 11:25:43";NULL
29;"A1";"Anonymous Proxy";0;0;"09/30/2004 11:25:43";NULL
30;"A2";"Satellite Provider";0;0;"09/30/2004 11:25:43";NULL
31;"AD";"Andorra";3;0;"09/30/2004 11:25:43";NULL
32;"AE";"United Arab Emirates";1;0;"09/30/2004 11:25:43";NULL
33;"AF";"Afghanistan";1;0;"09/30/2004 11:25:43";NULL
34;"AG";"Antigua and Barbuda";7;0;"09/30/2004 11:25:43";NULL
35;"AI";"Anguilla";7;0;"09/30/2004 11:25:43";NULL
36;"AL";"Albania";3;0;"09/30/2004 11:25:43";NULL
37;"AM";"Armenia";3;0;"09/30/2004 11:25:43";NULL
38;"AN";"Netherlands Antilles";3;0;"09/30/2004 11:25:43";NULL
39;"AO";"Angola";2;0;"09/30/2004 11:25:43";NULL
40;"AP";"Asia/Pacific Region";2;0;"09/30/2004 11:25:43";NULL
41;"AQ";"Antarctica";8;0;"09/30/2004 11:25:43";NULL
42;"AR";"Argentina";5;0;"09/30/2004 11:25:43";NULL
43;"AS";"American Samoa";6;0;"09/30/2004 11:25:43";NULL
44;"AW";"Aruba";5;0;"09/30/2004 11:25:43";NULL
45;"AZ";"Azerbaijan";1;0;"09/30/2004 11:25:43";NULL
46;"BA";"Bosnia and Herzegovina";3;0;"09/30/2004 11:25:43";NULL
47;"BB";"Barbados";5;0;"09/30/2004 11:25:43";NULL
48;"BD";"Bangladesh";1;0;"09/30/2004 11:25:43";NULL
49;"BF";"Burkina Faso";2;0;"09/30/2004 11:25:43";NULL
50;"BG";"Bulgaria";3;0;"09/30/2004 11:25:43";NULL
51;"BH";"Bahrain";1;0;"09/30/2004 11:25:43";NULL
52;"BI";"Burundi";2;0;"09/30/2004 11:25:43";NULL
53;"BJ";"Benin";2;0;"09/30/2004 11:25:43";NULL
54;"BM";"Bermuda";4;0;"09/30/2004 11:25:43";NULL
55;"BN";"Brunei Darussalam";1;0;"09/30/2004 11:25:43";NULL
56;"BO";"Bolivia";5;0;"09/30/2004 11:25:43";NULL
57;"BS";"Bahamas";7;0;"09/30/2004 11:25:43";NULL
58;"BT";"Bhutan";1;0;"09/30/2004 11:25:43";NULL
59;"BV";"Bouvet Island";5;0;"09/30/2004 11:25:43";NULL
60;"BW";"Botswana";2;0;"09/30/2004 11:25:43";NULL
61;"BY";"Belarus";3;0;"09/30/2004 11:25:43";NULL
2
C:\>sqlldr userid=system/manager control=test.ctl
SQL*Loader
Excel
Oracle
2(F)(N)
3 test.xls
4(F)(A)
text.txt C:\
5 SQL*Plus
system/manager
id
number,
--
username
varchar2(10),
--
password
varchar2(10),
--
sj
varchar2(20)
--
);
6 SQL*Loader C:\
input.ctl
load data
--1
infile 'test.txt'
--2
test.txt
--3 test
--4 X'09'
TAB
(id,username,password,sj)
-----
ainsert
bappend
creplace
dtruncate
7 DOS SQL*Loader
input.log
input.bad
8 SQL*Plus
. FOXPRO
---- file/export,Type delimited text, To
,Fro FOXPRO ,
----
ry.ctl
1,"","",04/16/1964
2,"","",/ /
3,"","",05/12/1970
... ...
.
LOAD DATA
INFILE *
REPLACE
INTO TABLE wxryb
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED '"'
(xh,name,sex,birth date(20) "mm/dd/yyyy")
BEGINDATA
1,"","",04/16/1964
2,"","",/ /
3,"","",05/12/1970
... ...
---- INFILE * REPLACE
INSERTAPPEND wxryb ORACLE (xh,name,sex,birth
date(20) "mm/dd/yyyy") wxryb "mm/dd/yyyy"
BEGINDATA
. ftp
. oracle
.
QA000723
: 1999 3 30 2000 10 18
C/C++ -
FoxPro/Visual FoxPro -
MISPCNovell NetWare
Foxpro 2.5 for DOSFoxpro 2.5 for Windows,dbf
OracleMIS
FoxproOracleFoxprodbfOracleSQL*Loader
OracleSQL*Loader
---- *Foxpro,dbfSDF
---- *dbfOracleCREATE TABLESQL
---- *Oracle,OracleCREATE TABLESQL
---- *dbfSQL*Loader
---- *SQL*Loader
----CREATE TABLESQLSQL*Loader
POSITION
Borland C++ 5.0 C++load.cppSQL*Loader
CREATE TABLESQLload
---- * load <>
---- *Oracle,OracleCREATE TABLESQL
---- *SQL*Loader
----FoxproOracle for Digital UNIX +Windows
95 client/server
http://www2.ccw.com.cn/tips/9901/01172_3.asp
VFP