Hi,
I am trying to load a dataset using SQL*Loader but, the initial field does not load into the database from the file. This is despite the load completing successfully.
CONTROL FILE:
----------------------START ----------------
LOAD DATA
INFILE 'ES_stories.csv'
BADFILE 'ES_Stories.bad'
DISCARDFILE 'ES_Stories.dsc'
APPEND
CONTINUEIF NEXT(1) != "@#@"
INTO TABLE "ES_STORIES"
APPEND
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(ID CHAR(100)
,
STORYDATE POSITION(*) DATE 'YYYY-MM-DD HH:MI:SS' ENCLOSED BY '"' AND '"'
,
TITLE CHAR(4000) ENCLOSED BY '"' AND '"'
,
SYNOPSIS CHAR(100000) ENCLOSED BY '"' AND '"'
,
COPY CHAR(100000) ENCLOSED BY '"' AND '"'
,
ASSETS_URL CHAR(4000) ENCLOSED BY '"' AND '"'
,
FILE_URL CHAR(4000)
,
LASTUPDATE DATE 'YYYYMMDDHHMISS'
,
VERSION CHAR(100000)
,
LATESTFLAG
,
MONTHFLAG
)
------- END OF CONTROL FILE ------------
The first field ID - does not get loaded into the database whereas all the other files do. An example of the data is:
439,"2002-06-10 01:00:00","UK ....
When loaded, this field is null in the database.
Also, some of the fields in the data file spans over several lines. To get around it, I have had to add the "@#@" character to the end of each record manually. Is there any way around this?
Thanks in advance,
Vivek