Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 246879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:12:33+00:00 2026-05-11T21:12:33+00:00

In order to load data (from a CSV file) into an Oracle database, I

  • 0

In order to load data (from a CSV file) into an Oracle database, I use SQL*Loader.

In the table that receives these data, there is a varchar2(500) column, called COMMENTS.
For some reasons, I want to ignore this information from the CSV file.
Thus, I wrote this control file:

Options (BindSize=10000000,Readsize=10000000,Rows=5000,Errors=100)
  Load Data
  Infile 'XXX.txt'
  Append into table T_XXX
  Fields Terminated By ';'
  TRAILING NULLCOLS
(
    ...
    COMMENTS FILLER,
    ...
)

This code seems to work correctly, as the COMMENTS field in database is always set to null.

However, if in my CSV file I have a record where the corresponding COMMENTS field exceeds the 500 characters limit, I get an error from SQL*Loader:

Record 2: Rejected - Error on table T_XXX, column COMMENTS.
Field in data file exceeds maximum length

Is there a way to really exclude the processing of my COMMENTS fields?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:12:34+00:00Added an answer on May 11, 2026 at 9:12 pm

    I can’t reproduce your problem. I’m using Oracle 10.2.0.3.0 with SQL*Loader 10.2.0.1.

    Here is my test case:

    SQL> CREATE TABLE test_sqlldr (
      2     ID NUMBER,
      3     comments VARCHAR2(20),
      4     id2 NUMBER
      5  );
    
    Table created
    

    Control file:

    LOAD DATA
    INFILE test.data
    INTO TABLE test_sqlldr
    APPEND
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    ( id,
      comments filler,
      id2
    )
    

    data file:

    1;aaa;2
    3;abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz;4
    5;bbb;6
    

    I’m using the command sqlldr userid=xxx/yyy@zzz control=test.ctl and I’m getting all the rows without errors:

    SQL> select * from test_sqlldr;
    
            ID COMMENTS                    ID2
    ---------- -------------------- ----------
             1                               2
             3                               4
             5                               6
    

    You may try another approach, I’m getting the same desired result with the following control file:

    LOAD DATA
    INFILE test.data
    INTO TABLE test_sqlldr
    APPEND
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    ( id,
      comments "substr(:comments,1,0)",
      id2
    )
    

    Update following Romaintaz’s comment: I looked into it again and managed to get the same error as you when the size of the column exceeded 255 characters. This is because the default datatype of SQL*Loader is char(255). If you have a column with more data you will have to specify the length. The following control file solved the problem for a column with 300 characters:

    LOAD DATA
    INFILE test.data
    INTO TABLE test_sqlldr
    APPEND
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    ( id,
      comments filler char(4000),
      id2
    )
    

    Hope this Helps,

    —
    Vincent

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 401k
  • Answers 401k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer i doubt any gem could do it decently. there are… May 15, 2026 at 4:30 am
  • Editorial Team
    Editorial Team added an answer If you are using MS Access 2003, from OpenReport Method… May 15, 2026 at 4:30 am
  • Editorial Team
    Editorial Team added an answer If PyWin32 is available: free, total, totalfree = win32file.GetDiskFreeSpaceEx(r'\\server\share') Where… May 15, 2026 at 4:30 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.