In SQL loader, I got ORA-01843: not a valid month
Hello there,
I tried to add two date columns (attribute4 and attribute5) to my SQL loader file but it didn't work. Here is the detail information:
1) my sql loader file (I just listed the new columns):
load data
DISCARDMAX 999
replace
into table NEH_POGRANT_LOAD
FIELDS TERMINATED BY '~'
--WHEN institution_type = 'I'
(
attribute4 "TO_CHAR(TO_DATE(:attribute4,'MM/DD/YYYY HH:MI:SS AM'),'DD-MON-YYYY HH:MI:SS AM')",
attribute5 "TO_CHAR(TO_DATE(:attribute5,'MM/DD/YYYY HH:MI:SS AM'),'DD-MON-YYYY HH:MI:SS AM')"
)
2) my date format in flat file:
~~~~~~9/1/2023 12:00:00 AM~6/30/2024 12:00:00 AM~
3) Error when I ran SQL loader: