Loading date without time component [message #70643] |
Wed, 10 July 2002 11:26 |
Santosh George
Messages: 27 Registered: June 2002
|
Junior Member |
|
|
I need to load data using SQL Loader using the SYSDATE constant on a date field. However, I want the date to be formatted to just the day part - i.e. no time component, or rather the time component should be set to midnight. Is there any way to format dates in SQL Loader? Here is the control file with the offensive date format...
options (direct=false)
load data
infile '/export/home/iaprod/coc/data/krmtwdum.dat'
APPEND
into table coc_fctr_rlup
FIELDS TERMINATED BY '#'
(
risk_sys_c,
acct_d TO_DATE(sysdate,'DD-MON-YYYY'),
dhc_co_c,
)
|
|
|
|
Re: Loading date without time component [message #70656 is a reply to message #70648] |
Wed, 10 July 2002 22:01 |
Santosh George
Messages: 27 Registered: June 2002
|
Junior Member |
|
|
Mahesh,
I had tried trunc as follows and it did not work. Is my syntax wrong? Has it worked for you?
options (direct=false)
load data
infile '/export/home/iaprod/coc/data/krmtwdum.dat'
APPEND
into table coc_fctr_rlup
FIELDS TERMINATED BY '#'
(
risk_sys_c,
acct_d trunc(sysdate),
dhc_co_c,
)
|
|
|