getting error when loading the data. Any idea [message #158477] |
Sat, 11 February 2006 16:14 |
pzlj6x
Messages: 107 Registered: May 2005 Location: Louisville
|
Senior Member |
|
|
I am trying to load a file which has plan text without complexity. But getting error as below.
Any idea, where I am going wrong.
Error Description:
========
SQL*Loader: Release 10.2.0.1.0 - Production on Sat Feb 11 15:43:43 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-350: Syntax error at line 12.
Expecting valid column specification, "," or ")", found keyword terminated.
TERMINATED BY '|'
^
===========
Control file structure
LOAD DATA
INFILE 'D:\SampleTest.txt'
BADFILE 'D:\SampleTest.bad'
DISCARDFILE 'D:\SampleTest.dsc'
INTO TABLE "SAMPLE_TEST"
(FLD1 CHAR
TERMINATED BY '|'
,
FLD2 VARCHAR
TERMINATED BY '|'
,
FLD3 CHAR
)
====
Sample data file
"51|D|D0115"
"51|Y|D0999"
"51|X|D0908"
"51|Z|D0908"
Please help.
R
|
|
|
|
Re: getting error when loading the data. Any idea [message #158506 is a reply to message #158477] |
Sun, 12 February 2006 09:07 |
pzlj6x
Messages: 107 Registered: May 2005 Location: Louisville
|
Senior Member |
|
|
Thank you for the suggestion. It did work for me after I removed the double quotes in the beginging and at the end of the record. Also I noticed that you don't need to give the SUBSTR clause, in stead add "trailing nullcols".
Here is the modified one.
Thanks for all the help. Appreciate it.
LOAD DATA
INFILE 'D:\oracle\SampleTest.txt'
BADFILE 'D:\SampleTest.bad'
DISCARDFILE 'D:\SampleTest.dsc'
INTO TABLE "SAMPLE_TEST"
FIELDS TERMINATED BY '|' trailing nullcols
(fld1,
fld2,
fld3 )
|
|
|