unix variables in control file [message #73971] |
Thu, 12 August 2004 11:17 |
Santosh George
Messages: 27 Registered: June 2002
|
Junior Member |
|
|
I am using sqlldr from a unix. I want to pass in the data file name,
table name and table partition name as unix variables that are exported
from the shell script. However, while the data file is recognized by
the control file, the table and partiton names are not - SQL Loader
complains of expecting double quotes for ${TMP_TABLE} and ${PARTITION_NAME}
OPTIONS
(
ERRORS=100,
DIRECT=FALSE,
SILENT=(HEADER,FEEDBACK)
)
LOAD DATA
INFILE '${CIR_DATA}/summary/${DAT_FILE}' "fix 326"
APPEND
PRESERVE BLANKS
INTO TABLE ${TMP_TABLE} PARTITION ${PARTITION_NAME}
I also tried the following lines with no luck
INTO TABLE '${TMP_TABLE}' PARTITION '${PARTITION_NAME}'
INTO TABLE "${TMP_TABLE}" PARTITION "${PARTITION_NAME}"
All the unix variables are being exported from the calling shell script.
What is the correct syntax please?
|
|
|
|
Re: unix variables in control file [message #73982 is a reply to message #73979] |
Sat, 14 August 2004 12:36 |
Santosh George
Messages: 27 Registered: June 2002
|
Junior Member |
|
|
Thanks for the suggestion. I also came across another method which involves parsing the control file using unix's SED command and replacing the variables like table name or partition name with the values I want. This search and replace will be done from the calling script.
|
|
|