Home » RDBMS Server » Server Utilities » Import SQL Loader
Import SQL Loader [message #228895] Wed, 04 April 2007 08:39 Go to next message
jra_kumar
Messages: 7
Registered: April 2007
Location: India
Junior Member
I want to use the sql loader to import the csv file into oracle fixed table. The problem is how to pass the parameter to the "INLINE" for the sql loader. I'm using windows as my OS and use the toad for the Oracle 9i version. The filename will be different for each day like file010107, file010207,...etc

Please tell me, how to call the control file with the parameter {which is the file name}
Re: Import SQL Loader [message #228900 is a reply to message #228895] Wed, 04 April 2007 08:53 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I do not use TOAD.
But with simple command line interface, you can pass datafile name as input.
oracle@mutation#sqlldr help=y
userid          ORACLE username/password
control         Control file name
log             Log file name
bad             Bad file name
data            Data file name
Re: Import SQL Loader [message #228916 is a reply to message #228900] Wed, 04 April 2007 09:17 Go to previous messageGo to next message
jra_kumar
Messages: 7
Registered: April 2007
Location: India
Junior Member
But, how to define the "inline" line there?
Re: Import SQL Loader [message #228922 is a reply to message #228916] Wed, 04 April 2007 09:28 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
use
INFILE *

in your controlfile
oracle@mutation#cat test.ctl
load data
INFILE *
truncate
INTO TABLE T1
(
n
)
oracle@mutation#cat t1.data
1
2
3
4
5
oracle@mutation#sqlldr userid=scott/tiger control=test.ctl data=t1.data

SQL*Loader: Release 9.2.0.8.0 - Production on Wed Apr 4 10:29:19 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Commit point reached - logical record count 5

oracle@mutation#query mutation scott.t1

         N
----------
         1
         2
         3
         4
         5

Previous Topic: Huge trace file getting created
Next Topic: Import from 9i to 8i
Goto Forum:
  


Current Time: Tue Jul 02 16:17:07 CDT 2024