Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to specify relative path in SQL*Loader control file?

Status
Not open for further replies.

slicendice

Programmer
Jun 28, 2002
164
GB
Hello
I'm just wondering if it's possible to specify a relative path in a SQL*Loader control file - so something along the lines of:

Code:
LOAD DATA
INFILE '../data1.csv'
BADFILE '../data1.bad'
DISCARDFILE '../data1.dsc'
TRUNCATE INTO TABLE data1
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
 col1     INTEGER EXTERNAL,
 col2     CHAR,
 col2     DATE "DD/MM/YYYY"
)

I've tried doing something along the lines of the above, but it just gets kicked out with the error "The system cannot find the file specified".

I believe you can specify a full path, but it's specifically a relative path that I'm looking at.

Thanks very much!
 
A quick test suggests that it is possible to specify a relative path, as in your example. The path is relative to whatever the current directory is when SQL*Loader is invoked. So, in order to get consistent results, you would have to always switch to the same directory before starting the loader.
 
Slicendice,

Have you confirmed KarlUK's correct observation? We would like to know your findings.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
A later test failed to confirm my earlier finding. It looks as if SQL*Loader can only find files in the user's current directory or those with fully qualified paths.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top