Home » RDBMS Server » Server Utilities » Loading date without time component
Loading date without time component [message #70643] Wed, 10 July 2002 11:26 Go to next message
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 #70648 is a reply to message #70643] Wed, 10 July 2002 18:58 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
you can use a trunc(sysdate)
Re: Loading date without time component [message #70656 is a reply to message #70648] Wed, 10 July 2002 22:01 Go to previous message
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,
)
Previous Topic: Re: SQL*Loader vs. Import
Next Topic: Re: FREE OCP PAPERS
Goto Forum:
  


Current Time: Fri May 03 11:45:01 CDT 2024