How can we pass value from unix shell script parameter to sql file and sqlloader control file.
Example- In shell script, i have value for batch_id column say 4 which is step1 in script,
Ques1- In the same script, step 2 calls sqlloader to load ctrlfile into Oracle table. How can i add $batch_id value(step2
generated value) in ctrl file.
Example- load data
into table test
fields terminated by "|"
pmv constant 'L'
id $batch_id(?? i want to load $batch_id value which is 4 to id column in ctrl file.How can i do this?)
Ques2- Step 3 in same script, calls sql file which is a.sql. In sql file, there are many update and select statements.I want to
substitute id column to $batch_id in sql file
Example - a.sql
select name from emp where id=$batch_id;(?? i want to load $batch_id value which is 4 to id column in sql file.How can i do this?)
There are many other select update statements..in this sql file which uses id=$batch_id