Home » RDBMS Server » Server Utilities » inserting SYSDATE in a table column while creating a control file to load data using SQL loader
inserting SYSDATE in a table column while creating a control file to load data using SQL loader [message #71922] Wed, 05 February 2003 13:31 Go to next message
Sabrina
Messages: 76
Registered: February 2002
Member
My control file looks like,

Load data infile ‘expt.TXT’
Into table proc_code append
(
PROC_CD POSITION (1-20)
TYPE_DESC POSITION (21-25)
NAME POSITION (26-29)
POS5_20 POSITION (30-36)
REC_CREATE_DATE DATE
)

What i want to do is,
in the column REC_CREATE_DATE, i want to insert the current date (SYSDATE)..

Can anyone help me with this?
Thank you very much!
Re: inserting SYSDATE in a table column while creating a control file to load data using SQL loader [message #71923 is a reply to message #71922] Wed, 05 February 2003 14:32 Go to previous messageGo to next message
Sabrina
Messages: 76
Registered: February 2002
Member
never mind, got it
Re: inserting SYSDATE in a table column while creating a control file to load data using SQL loader [message #73222 is a reply to message #71922] Thu, 04 March 2004 14:20 Go to previous messageGo to next message
Dani
Messages: 15
Registered: October 2000
Junior Member
How did you do this? I am having the same problem
Re: inserting SYSDATE in a table column while creating a control file to load data using SQL loader [message #73240 is a reply to message #73222] Sat, 06 March 2004 13:20 Go to previous message
Barbara Boehmer
Messages: 9097
Registered: November 2002
Location: California, USA
Senior Member
Here is an example control file for you:

LOAD DATA
INFILE 'test.dat'
REPLACE
INTO TABLE your_table
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
  (col1,
   col2,
   <b>col3 "SYSDATE"</b>)
Previous Topic: Urgent! Sould we stop here? (troubles while using the ODBC driver for Oracle)
Next Topic: sql loader control file using tab as a delimiter
Goto Forum:
  


Current Time: Sat Jun 29 04:55:08 CDT 2024