Question : Loading multi-line field using SQL Loader into Oracle Tables

Hello Experts,

I am trying to load the .csv file into Oracle Tables using SQL Loader script.
It is giving me a bunch of errors. I have already built a the table DDL;
below is the script for table DDL and Control File respectively, and attached is the files of .CSV
-------------------------------------------------------------------
create table DBS_CLASINFO(
xlocator        varchar2(25),
section     varchar2(25),    
memo            varchar2(4000)
)
tablespace EXAMPLE
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
-------------------------------------------------
CONTROL FILE FOR DATA LOADING USING SQL LOADER
-------------------------------------------------------------------------

OPTIONS(SKIP=1, DIRECT=TRUE, ERRORS = 500)
UNRECOVERABLE
LOAD DATA
INFILE          'C:\sql_loader\DBS_foxpro\clasinfo.csv'
BADFILE         'C:\sql_loader\DBS_foxpro\clasinfo.bad'
DISCARDFILE     'C:\sql_loader\DBS_foxpro\clasinfo.dsc'
TRUNCATE
INTO TABLE dbs_clasinfo
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(
xlocator          char,
section          char,
memo            char)

--------------------------------------------------------------------------------

Any kind of help is greatly appreciated.

Thanks,
Vishal
Attachments:
 
CSV file to be loaded
 

Answer : Loading multi-line field using SQL Loader into Oracle Tables

I assume the error is:  "Field in data file exceeds maximum length"

Check out the solution provided in:

http://forums.oracle.com/forums/thread.jspa?threadID=82906

I set this up on my system and was able to load a subset of your data:

drop table tab1 purge;
create table tab1 (xlocator varchar2(4000), section varchar2(4000), memo clob);


1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
OPTIONS(SKIP=1, DIRECT=TRUE, ERRORS = 500)
UNRECOVERABLE load data
infile *
CONTINUEIF next preserve(1:2) != '<>'
INTO TABLE tab1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(pipe         filler,
xlocator          char,
section          char,
memo            char(1000000))
begindata
pipe,xlocator,section,memo
<>,0000005611,Course Description,"Internet training, Outlook, and Braille Life Training"
<>,0000005662,Course Description,"Internet training, Outlook, and Braille Life Training"
<>,0000005707,Agenda,"JANUARY 29, 2001  (MONDAY)
1:00 p.m.-4:30 p.m.

Introductions, Housekeeping, Announcements	Gloria Gleespen

AIDS 101						Dr. Steven Harris, Health Authority,
						City of Austin & Travis County

JANUARY 30, 2001  (TUESDAY)
8:30 a.m.-4:30 p.m.

AIDS 101 (continued)				Dr. Steven Harris

LUNCH

Teens and HIV/AIDS				Rose Sims, Austin/Travis County 
						Health Department

Babies and Children with HIV/AIDS			Linda Traurig, R.N., Director, 
						Faith Home

BREAK

Panel:  Living with AIDS 			Sandy Bartlett, Community 
					Information/Education Coordinator, 
					AIDS Services of Austin

Questions/Answers

JANUARY 31, 2001  (WEDNESDAY)
8:30 a.m.-12:00 noon

Challenges of Living with AIDS			Sandy Bartlett

Using Universal Precautions at TCB			Gloria Gleespen

BREAK	

Service Provision Guidelines				Cynthia Guilbeau, Glenda Embree, 
and Agency Workplace Guidelines			Doni Sims, Scott Bowman

Wrap-up
"
<>,0000005728,Agenda,"The Americans with Disabilities Act:  Implications for the Commission for the Blind

Offered by:  	Southwest DBTAC (Disability and Business Technical Assistance Center) on the ADA & The Houston 		Office of the EEOC (Equal Employment Opportunity Commission)

AGENDA

June 21, 2000

10:00 a.m.	Welcome & Introductions

10:05 a.m.	The Meaning of Title I of the ADA
		· A Seriously Fun Game: Million Dollar Questions
		· Observe the Employer and Employee: They meet, greet and demonstrate their rights and responsibilities 		   in the office.

10:45 a.m.	Legal Update: The meaning of recent Supreme Court decisions

11:15 - 11:30 a.m.	B R E A K (Snack Time!)

11:30 a.m.	Interactive Exercises: Applying the ADA to common scenarios.  Q&A will be incorporated into these 			exercises.

12:30 - 12:45 p.m.	Additional Q & A 

12:45 - 1:00 p.m.	Wrap-up and Fill out Evaluations!"
<>,0000005728,Policy,"Required training for all agency staff.  Staff who did not attend this live videoconference via downlink site(s) must screen the video no later than August 31, 2000."
Random Solutions  
 
programming4us programming4us