我正在尝试从文件加载数据,我想将 CREATED_DATE 和 UPDATED_DATE 设置为 SYSDATE 并将 CREATE_BY 和 UPDATED_BY 设置为 USER
这是我正在使用的表:
CREATE TABLE CATALOG
(CNO NUMBER,
CTITLE VARCHAR2(25),
CREATED_BY VARCHAR2(10) NOT NULL,
CREATED_DATE DATE NOT NULL,
UPDATED_BY VARCHAR2(10) NOT NULL,
UPDATED_DATE DATE NOT NULL,
CONSTRAINT CATALOG_PK Primary Key (CNO));
这是数据文件:
1,"Title 1"
2,"Title 2"
3,"Title 3"
4,"Title 4"
5,"Title 5"
6,"Title 6"
和我的控制文件:
LOAD DATA
INFILE "mydata.csv"
INTO TABLE CATALOG
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(CNO,CTITLE,CREATED_BY "USER", CREATED_DATE "SYSDATE", UPDATED_BY "USER", UPDATED_DATE "SYSDATE")
当我尝试使用 SQL Loader 加载它时...所有记录都被拒绝:
Record 1: Rejected - Error on table CATALOG, column CREATED_BY.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 2: Rejected - Error on table CATALOG, column CREATED_BY.
Column not found before end of logical record (use TRAILING NULLCOLS)
.......
任何想法我做错了什么?提前致谢。