Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Loader: How do I load more than 300 characters long fields

Re: SQL*Loader: How do I load more than 300 characters long fields

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 02 Sep 1999 11:15:48 GMT
Message-ID: <37d05c50.54641199@newshost.us.oracle.com>


A copy of this was sent to chi-on wong <john.wong_at_sun.com> (if that email address didn't require changing) On Wed, 01 Sep 1999 23:22:46 -0700, you wrote:

>Hi,
>
>In a .csv file I have something like this:
>
>John,Then something very very very long about 300
>characters......................................................................
>................................................................................
>......................................................,99
>
>I am trying to load it into a table with
>
>create table test(
>name varchar2(10),
>comments varchar2(500),
>age varchar2(10))
>
>
>Although the comments field is varchar2(500), SQL*Loader will reject
>anything
>longer than 255 characters with this error:
>
>

In your .ctl file put a char(300) for example:

LOAD DATA
INFILE *
INTO TABLE dept
REPLACE
FIELDS TERMINATED BY '|'
(
deptno
,dname char(500)
,loc
)

lets dname be upto 500 bytes.

>Record 1: Rejected - Error on table TEST, column COMMENTS.
>Field in data file exceeds maximum length
>
>
> What can I do to load the 300 characters field into
>the comments field?

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Sep 02 1999 - 06:15:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US