baskinsr baskinsr -4 years ago 258
SQL Question

Oracle - SQLLDR Command Line

Is it possible to call out the file path from a column in a table to dynamically run multiple import files?

My script currently is

$sqlldr userid=XX/XX control=C:\Users\Richard\Desktop\inserttest.ctl log=C:\Users\Richard\Desktop\inserttest.log;

This script runs properly. What I am attempting to do is something like this:

$sqlldr userid=XX/XX control=(select ctlfilepath from MASTERDATA where Table_Name='BOM') log=(select logfilepath from MASTERDATA where Table_Name='BOM');

The purpose would be for me to put all of my file paths into one table and call them out more dynamically.

Answer Source


However, you might want to consider using external table, rather than sqlloader. Using external tables, you can dynamically modify the files that make up an external table.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download