Ask the Expert

Loading data with command prompt

I have been trying to load some data into an Oracle table through sqlldr80 by way of the command prompt. I keep getting the message of...

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

And I have tried to fix it by maxing out my constraint to varchar2(4000) and I still get this message. When I went back to the problem, I counted the characters and I got only 270. What could be causing this? I am rather new at this, so if it is a dumb question I apologize but I truly don't know what to do.
Thank

    Requires Free Membership to View

you for any help possible,
Mike


Mike,

First a little bit of terminology here. Your column does not have a "constraint" limiting it to so many characters. Rather it is "defined" to be at most so many characters. You can change this by issuing the following command:

   ALTER TABLE csrd_log_rtt MODIFY (purpose VARCHAR2(4000));

This will let the PURPOSE column of the table hold at max 4000 characters. But this may not have been your problem. In order to use SQL*Loader, you must use a control file. This control file specifies how to handle the incoming data and where to put it. There may be a limitation in the control file on that column. You stated that there were 270 characters in the input file. What is the limitation on that column in the control file? Chances are very good that it is fewer than 270 characters.

For More Information


This was first published in May 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: