SQL Control file
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: SQL Control file

  1. #1
    Join Date
    Jan 2010
    Posts
    20

    SQL Control file

    I have a csv file containing NULL columns.
    for example,
    BASIC","5317",,,,,130,1,12
    BASIC","5313",,,,,130,1,12

    I need to load the data to the table for which all the columns are defined with NOT NULL constraint.
    Since i have bulk data to load, it is not possible to fill the null columns with zeros or spaces. Is there any way to load the csv file without modifying the csv file and table defintion.?
    I am using SQL loader for this purpose. Please let me know if there is a way change the control file to get the desired results.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,445

    Cool Defaultif

    If the table definition has column defaults, use the DEFAULTIF clause in the controlfile fields.

    Othewise code something like this:
    Code:
    LOAD DATA
    -- etc --
    INTO TABLE -- etc --
    (...
    , fieldx "NVL(:fieldx,'{default value here}')"
    , ...
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Jan 2010
    Posts
    20
    thanks for yur inputs.

Posting Permissions

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



Click Here to Expand Forum to Full Width