Load data of multiple files from dynamic [message #647275] |
Mon, 25 January 2016 04:11 |
|
If I keep Control file, data file and Batch file in same location, I can load multiple csv files in a single table using single control file as below:
for %%f in (*.csv) do sqlldr hr/hr@xe control=emp_data.ctl data=%%f
But I need the data file should be in different location.
I created separate folders like BATCH, CTL, DATA and tried to modify the script as below:
@echo off
set dir_path=C:\Users\smokarem\Loader
@echo on
for %%f in (!dir_path!\data\*.csv) do sqlldr hr/hr@xe control=!dir_path!\ctl\emp_data.ctl data=!dir_path!\data\%%f.csv
This is not working. Please help me to resolve it.
|
|
|
|
Re: Load data of multiple files from dynamic [message #647279 is a reply to message #647278] |
Mon, 25 January 2016 04:54 |
|
Quote:
What does "it is not working" mean?
Means, it cannot load data.
An small modification on previous code which cannot load data.
@echo off
set dir_path=C:\Users\smokarem\Loader
@echo on
for %%f in (!dir_path!\data\*.csv) do sqlldr hr/hr@xe control=!dir_path!\ctl\emp_data.ctl data=!dir_path!\data\%%f
|
|
|
|
|