Hi! I will like to replace the hardcoded data file path by an environment variable in my SQL*Loader control file, something like:
LOAD DATA
INFILE "%GOLDPATH%\GoldData.txt"
or
LOAD DATA
INFILE %GOLDPATH%"\GoldData.txt"
or
LOAD DATA
INFILE %GOLDPATH%\GoldData.txt
But I got the same error from SQL*Loader in all above cases:
SQL*Loader-350: Syntax error at line 2.
Illegal combination of non-alphanumeric characters
Then I copied the control file over to the source directory and tried to invoke the control file as %GOLDPATH%\GoldData.ctl; now SQL*Loader complained it could not open the source file due to file-not-found. Apparently SQL*Loader has to be invoked from the location where the control file resides.
I went through the SQL*Loader manual and METALINK site but did not find any reference to use environment variable in the INFILE clause. Has anybody done it?
Thanks in advance!
Regards, Nancy
LOAD DATA
INFILE "%GOLDPATH%\GoldData.txt"
or
LOAD DATA
INFILE %GOLDPATH%"\GoldData.txt"
or
LOAD DATA
INFILE %GOLDPATH%\GoldData.txt
But I got the same error from SQL*Loader in all above cases:
SQL*Loader-350: Syntax error at line 2.
Illegal combination of non-alphanumeric characters
Then I copied the control file over to the source directory and tried to invoke the control file as %GOLDPATH%\GoldData.ctl; now SQL*Loader complained it could not open the source file due to file-not-found. Apparently SQL*Loader has to be invoked from the location where the control file resides.
I went through the SQL*Loader manual and METALINK site but did not find any reference to use environment variable in the INFILE clause. Has anybody done it?
Thanks in advance!
Regards, Nancy