I have an external table linked to csv file like this:
create table XT_FIN
(
ba_date DATE
)
organization external
(
type ORACLE_LOADER
default directory XT_C
access parameters
(
records delimited by newline
badfile XT_LOGS:'f.bad'
logfile XT_LOGS:'f.log'
discardfile XT_LOGS:'f.dsc'
skip 1
fields terminated by ',' optionally enclosed by '"'
lrtrim
missing field values are null
(
BA_DATE DATE 'MM/DD/YYYY HH:MI:SS am'
)
)
location (XT_C:'detail.csv')
)
reject limit UNLIMITED;
CSV file datetime format changed to 24 hours, so I wanted to chnage it in this table using this statement:
ALTER TABLE
XT_FIN
MODIFY ( BA_DATE DATE 'MM/DD/YYYY HH24:MI:SS' );
but it doesn't like having format string after DATE, it wants ) instead. How do I change only format of this Date column? Thanks
You are trying to change the column definition in the table itself - and a date column doesn't have a format. You are altering an external table and you need to change the access parameters instead:
This replaces the whoel access parameters section though, so you really need to re-specify all the other settings too:
... including any other columns you omitted from your post.