i have CSV file. i want to load content of csv file to oracle database with SQLLDR.
My SQLLDR is
@echo off
sqlldr black@user/password data=D:\csv\data.csv control=D:\ctl\loader.ctl log=D:\ctl \loader.log bad=D:\ctl\loader.bad
pause
My loader.ctl is
OPTIONS (SKIP=1)
LOAD DATA
APPEND
INTO TABLE data2007
FIELDS TERMINATED BY ',' TRAILING NULLCOLS
( number "TRIM (:number)",
name "TRIM (:name)",
total "TRIM (:total)",
)
Table
CREATE TABLE DATA2007 (
number VARCHAR2(6),
name VARCHAR2(30),
total NUMBER NULL,
)
My data.csv :
Number,name,Total
1,"Marlyn",2000
2,"Bobby",1000
3,"Rina",2000
4,"Robby,Mr",5000
5,"juliet,Mrs",5000
rows 1,2,3 = successful, but rows 4 and 5 rejected. I know what the problem are rows 4 and 5 there are four columns.
- how to solve this problem?
- during load can I insert the current date after "total" field?