Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: passing a variable into the sqlloader control file

RE: passing a variable into the sqlloader control file

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Tue, 28 May 2002 12:13:33 -0800
Message-ID: <F001.0046D308.20020528121333@fatcity.com>


John,

Use "ECHO" commands to generate your control-file from within the shell script. You can then use the environmentals created by your input params.

Something like:

$1 = filename

echo SOURCE_FILE CONSTANT "$1" > control.ctl
echo SECOND_LINE CONSTANT "$1" >> control.ctl

then run sqlloader using the control file you created.

make sense?

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Tuesday, May 28, 2002 3:55 PM
To: Multiple recipients of list ORACLE-L

Looking for a way in Unix to pass a variable into a Sqlloader control, and then use that as a constant. Database version is 7.3.4

I tried something like:

When running, I get the error:
SQL*Loader-350: Syntax error at line 13. Illegal combination of non-alphanumeric characters $1=SOURCE_FILE It does not like the $ on the imput variable. Anyone have any ideas or a work around?

TIA. John

"K" Line America, Inc.
john.fedock_at_kline.com
www.kline.com

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Fedock, John (KAM.RHQ)
  INET: John.Fedock_at_KLINE.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue May 28 2002 - 15:13:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US