Solved

SQLLDR with a constant in the control file

Posted on 2006-10-23
2
3,332 Views
Last Modified: 2012-08-13
Hi I am trying to setup a control file for sqlldr I write the file just before I do an import so the file is dynamic. When I write the file I want to set one of my parameters to a fixed value somthing like the following:

UNRECOVERABLE
LOAD DATA
INFILE *
APPEND INTO TABLE CD.TARGET_LOAD
(
MY_FIXED_VALUE 911 INTEGER EXTERNAL
MY_NBR POSITION(13:25) INTEGER EXTERNAL
, MY_ID POSITION(324:329) INTEGER EXTERNAL
)

The My_FIXED_VALUE is the part that doesn't work though what is the proper syntax for this command?
0
Comment
Question by:toby_lang
2 Comments
 
LVL 6

Accepted Solution

by:
Ritesh_Garg earned 50 total points
ID: 17792384
Use this:

LOAD DATA
INFILE *
APPEND INTO TABLE CD.TARGET_LOAD
(
  MY_FIXED_VALUE     constant   "911"
, MY_NBR POSITION(13:25) INTEGER EXTERNAL
, MY_ID POSITION(324:329) INTEGER EXTERNAL
)

Remember to put your value in double-quotes.

Thanks,
Ritesh
0
 
LVL 32

Expert Comment

by:awking00
ID: 17797330
Ritesh_Garg's solution is correct. However, it's not necessary to include the value in quotes unless it is a reserved keyword.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question