Home » RDBMS Server » Server Utilities » Different log file name in the Control file of SQL Loader
Different log file name in the Control file of SQL Loader [message #234176] Mon, 30 April 2007 05:32 Go to next message
gbaliotis
Messages: 8
Registered: April 2007
Location: Greece
Junior Member
Dear all,

I get every day 3 log files with ftp from a Solaris Server to a Windows 2000 Server machine. In this Windows machine, we have an Oracle Database 9.2. These log files are in the following format: in<date>.log i.e. in20070429.log.

I would like to load this log file's data to an Oracle table every day and I would like to use SQL Loader for this job.

The problem is that the log file name is different every day.

How can I give this variable log file name in the Control file, which is used for the SQL Loader?

file.ctl

---------------------------------------------------------------
LOAD DATA
INFILE 'D:\gbal\in<date>.log'
APPEND INTO TABLE CHAT_SL
FIELDS TERMINATED BY WHITESPACE
TRAILING NULLCOLS
(SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
SL2 char,
SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
SL4 char,
SL5 char,
SL6 char,
SL7 char,
SL8 char,
SL9 char,
SL10 char,
SL11 char,
SL12 char,
SL13 char,
SL14 char,
SL15 char)
------------------------------------------------------------------

Do you have any better idea about this issue?

I thought of renaming the log file to an instant name, such as in.log, but how can I distinguish the desired log file, from the other two?

Thank you very much in advance.

Giorgos Baliotis
Re: Different log file name in the Control file of SQL Loader [message #234205 is a reply to message #234176] Mon, 30 April 2007 08:06 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Please search before posting
You can give input datafile in command line.
http://www.orafaq.com/forum/m/229434/42800/?srch=input+sqlldr#msg_229434
Previous Topic: SQL Loader problem with Date Format
Next Topic: SQL Loader ... Data file at http location
Goto Forum:
  


Current Time: Tue Jun 18 08:27:13 CDT 2024