我创建了一个外部表,除了其中一种日期格式外,一切看起来都很好,它看起来默认为 MM/DD/YYYY,但我希望它与文件中的 YYYYMMDD 一样。该列是 DATE_ID。有人有任何线索吗?
谢谢!
CREATE TABLE R2SCHD.AAFES_RDF_XTRNL_CAL_HIER
(
DATE_ID DATE,
DATE_DESC DATE,
WEEK_ID VARCHAR2(25 BYTE),
WEEK_DESC DATE,
MNTH_ID VARCHAR2(25 BYTE),
MNTH_DESC VARCHAR2(25 BYTE),
QRTR_ID VARCHAR2(25 BYTE),
QRTR_DESC VARCHAR2(25 BYTE),
HALF_ID VARCHAR2(25 BYTE),
HALF_DESC VARCHAR2(25 BYTE),
YEAR_ID VARCHAR2(25 BYTE),
YEAR_DESC VARCHAR2(25 BYTE),
DOW_ID VARCHAR2(25 BYTE),
DOW_DESC VARCHAR2(25 BYTE)
)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY R2SCHD_STATIC_DATA
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
NOBADFILE
NOLOGFILE
NODISCARDFILE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
(
DATE_ID CHAR(8) DATE_FORMAT DATE MASK "YYYYMMDD",
DATE_DESC CHAR(10) DATE_FORMAT DATE MASK "MM/DD/YYYY",
WEEK_ID,
WEEK_DESC CHAR(10) DATE_FORMAT DATE MASK "MM/DD/YYYY",
MNTH_ID, MNTH_DESC, QRTR_ID, QRTR_DESC, HALF_ID,
HALF_DESC, YEAR_ID, YEAR_DESC, DOW_ID, DOW_DESC
)
)
LOCATION (R2SCHD_STATIC_DATA:'rdft_cal_external.dat')
)
REJECT LIMIT UNLIMITED
NOPARALLEL
NOMONITORING;