Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    3

    Unanswered: SQL-LOADER : loade data in a specific column

    Hello,

    I am a beginner with SQL*Loader. I want to load a datafile with values only for one specific column. The destination table has 189 columns. The column 1 is the target (COL1). What I have to modify in the following control file ?

    LOAD DATA
    INFILE 'c:\test2.txt'
    APPEND
    INTO TABLE TEST_TABLE
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ( COL1
    )

    the datafile :

    12234
    12345
    12346
    12347

    (sorry, my english is poor :-) )
    regards
    Jerome

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: SQL-LOADER : loade data in a specific column

    It depends on what you want/need to put in the other 188 columns:
    - if they can be NULL you can omit them (they will be set to NULL)
    - if they are NOT NULL but have a DEFAULT you can omit them (they will be set to the DEFAULT)
    - if they are NOT NULL and do not have a DEFAULT then you must specify a value.

    In the last case, there are various options for specifying a value in the control file:

    COL2 CONSTANT 'x',
    COL3 RECNUM,
    COL4 SYSDATE,
    COL5 SEQUENCE (1)
    ...

    See the SQL Loader Guide here for more details:

    http://technet.oracle.com/docs/produ...06.htm#1008669

  3. #3
    Join Date
    Mar 2003
    Posts
    3
    Dear Andrewst,

    many thanks for your help, Have a nice WE.

    Jerome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •