Solved

SQLLDR with a constant in the control file

Posted on 2006-10-23
2
3,389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Deleting Rows from an Oracle Database - Performance 19 73
pl/sql - query very slow 26 88
Checking for column width 8 39
Error in creating a view. 8 33
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

756 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