Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    5

    Thumbs up Unanswered: Loading of Char datas

    Hi,

    I am inthe process of loading datas from flat file to Oracle table.
    When a character column is loaded with values of spaces then oracle is
    interpreting as null.
    create table load_test2(c char(5));
    the sqloader control file is written as
    load
    infile 'c:/load_test2.dat'
    replace
    into table load_test2
    (
    c position(1:5) char
    )
    The data file is
    12345,
    ,
    ssds ,
    The second record is taken as null but it is 5 spaces.
    Can anyone can give me suggestions what changes i have to make in the Sqlloader file so that spacel is not interpreted as null by oracle.
    I am in need to use position(1:5) clause.

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    If it is a fixed format file could you do an update statement to set c=' ' where c is null after the load.

    Alan

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Try

    into table load_test2
    (
    c position(1:5) char nullif PART_DATE_UPDATE=blanks
    )


    HTH
    Gregg

Posting Permissions

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