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 3279358
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:35:00+00:00 2026-05-17T19:35:00+00:00

I have an abstruse sqlldr problem that’s bothering me. My control file looks something

  • 0

I have an abstruse sqlldr problem that’s bothering me. My control file looks something like this:

load data
infile 'txgen.dat'
into table TRANSACTION_NEW
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
( A,
  B,
  C,
  D,
  ID "ID_SEQ.NEXTVAL"
)

Data is something like this:

a,b,c,
a,b,,d
a,b,,
a,b,c,d

If I don’t put the TRAILING NULLCOLS in, I get the “column not found before end of logical record” error. But although some of the columns are null, the commas are all there, so I don’t see a reason for sqlldr to misinterpret the input file, and not get to the end where it generates the ID from the database sequence.

This syntax has worked before with no null columns – why does a null column cause sqlldr to not reach the generated column?

I’ve got it working, I just want to understand WHY!?!

  • 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-17T19:35:01+00:00Added an answer on May 17, 2026 at 7:35 pm

    You have defined 5 fields in your control file. Your fields are terminated by a comma, so you need 5 commas in each record for the 5 fields unless TRAILING NULLCOLS is specified, even though you are loading the ID field with a sequence value via the SQL String.

    RE: Comment by OP

    That’s not my experience with a brief test. With the following control file:

    load data
    infile *
    into table T_new
    fields terminated by "," optionally enclosed by '"'
    ( A,
      B,
      C,
      D,
      ID "ID_SEQ.NEXTVAL"
    )
    BEGINDATA
    1,1,,,
    2,2,2,,
    3,3,3,3,
    4,4,4,4,,
    ,,,,,
    

    Produced the following output:

    Table T_NEW, loaded from every logical record.
    Insert option in effect for this table: INSERT
    
       Column Name                  Position   Len  Term Encl Datatype
    ------------------------------ ---------- ----- ---- ---- ---------------------
    A                                   FIRST     *   ,  O(") CHARACTER            
    B                                    NEXT     *   ,  O(") CHARACTER            
    C                                    NEXT     *   ,  O(") CHARACTER            
    D                                    NEXT     *   ,  O(") CHARACTER            
    ID                                   NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "ID_SEQ.NEXTVAL"
    
    Record 1: Rejected - Error on table T_NEW, column ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 2: Rejected - Error on table T_NEW, column ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 3: Rejected - Error on table T_NEW, column ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 5: Discarded - all columns null.
    
    Table T_NEW:
      1 Row successfully loaded.
      3 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      1 Row not loaded because all fields were null.
    

    Note that the only row that loaded correctly had 5 commas. Even the 3rd row, with all data values present except ID, the data does not load. Unless I’m missing something…

    I’m using 10gR2.

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

Sidebar

Related Questions

Have data that has this kind of structure. Will be in ascending order by
Have data that has this kind of structure: $input = [ { animal: 'cat',
Have a text box which get data for price. If someone enter something like
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Have a look at one of my websites: moskah.com The problem is that it
have a php code like this,going to convert it in to C#. function isValid($n){
have written this little class, which generates a UUID every time an object of
have a nice day. I got problem when trying to create an image from
have Googled the cr*p out of this one so apologies if the answer is

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.