使用下面的脚本我正在访问我的控制文件。我需要使用在数据中传递的文件名,即$ f,并且需要在TEMP_TABLE中插入控制文件。请指导我这件事。
#!/bin/sh
cd files_g41_in
e_payment_file=`ls *.DAT`
for f in $e_payment_file
do
sqlldr username/password@database control=/home/oracle/G41_GPRS/GPRS_G41.CTL data=$f log=/home/oracle/G41_GPRS/log_epmnt.txt
done
GPRS_G41.CTL
LOAD DATA
APPEND
INTO TABLE TEMP_TABLE
FIELDS TERMINATED BY "|"
(
column1,
column2,
insert_date SYSDATE,
created_by constant "ABC",
FileName <- Here I need to insert filename passed as data
)