Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL LOADER issue upon loading CSV records

TheProdigy101Jul 4 2014 — edited Jul 4 2014

Hi,

I have been loading a CSV records to an oracle table using SQL LOADER. Upon loading the CSV it doesn't continue on the other rows, it stops loading after the last row with comma on it on the last column. Here a sample of the CSV file.

MF3MBTLHANJ02,1/26/2013,0:15,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,0:30,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,0:45,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,1:00,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,1:15,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,1:30,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,1:45,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,2:00,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,2:15,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,2:30,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,2:45,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,3:00,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,3:15,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,3:30,0,0,0,,,

MF3MBTLHANJ02,1/26/2013,3:45,0,0,0,,, ---- LAST RECORD LOADED

MF3MBTLHANJ02,1/26/2013,4:00,0,0,0

MF3MBTLHANJ02,1/26/2013,4:15,0,0,0

MF3MBTLHANJ02,1/26/2013,4:30,0,0,0

MF3MBTLHANJ02,1/26/2013,4:45,0,0,0

MF3MBTLHANJ02,1/26/2013,5:00,0,0,0

MF3MBTLHANJ02,1/26/2013,5:15,0,0,0

MF3MBTLHANJ02,1/26/2013,5:30,0,0,0

CONTROL FILE:

OPTIONS(SKIP=1)

LOAD DATA

INTO TABLE CRSS.TEST_MTR

APPEND

FIELDS TERMINATED BY ',' optionally enclosed by '"'

TRAILING NULLCOLS

(SEIN,

BDATE,

TIME_COL,

KWD "to_number(replace(:KWD,',',''))" ,

KWHD  "to_number(replace(:KWHD,',',''))",

KVARHD  "to_number(replace(:KVARHD,',',''))",

KWR "to_number(replace(:KWR,',',''))",

KWHR "to_number(replace(:KWHR,',',''))",

KVARHR  "to_number(replace(:KVARHR,chr(13)))",

SOURCE CONSTANT ":FILE")

TABLE:

SEIN      VARCHAR2(20 BYTE)                   NOT NULL,

  BDATE     VARCHAR2(10 BYTE)                   NOT NULL,

  TIME_COL  VARCHAR2(20 BYTE)                   NOT NULL,

  KWD       NUMBER(30,14),

  KWHD      NUMBER(30,14),

  KVARHD    NUMBER(30,14),

  KWR       NUMBER(30,14),

  KWHR      NUMBER(30,14),

  KVARHR    NUMBER(30,14),

  SOURCE    VARCHAR2(21 BYTE)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 1 2014
Added on Jul 4 2014
3 comments
1,559 views