Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql loader question
larawole_at_aol.com (Larawole) wrote in
<20010703171558.03581.00002362_at_ng-cf1.aol.com>:
>I tried to load a flat file( comma, delimited) into an oracle db 8.1.5
>on Unix Server but got error
>
>SQL*Loader-00524 partial record found at end of datafile (string)
>
>I tried the loading the flatfile to an oracle db (personal oracle 8.0.4)
> on windows 98 and it worked.
>
>Can someone please tell me why the load did not work on 8.1.5 on unix
>and what I need to do to make it work.
>
>I have enclosed the table script, the control file and the flat file
>
>CREATE TABLE LOGIN_LOAD
>(First_name Varchar2(30),
> Last_name Varchar2(30),
> Display_Name Varchar2(80),
> LOGIN_NAME VARCHAR2(10),
> EX_EMAIL_ADDRESS Varchar2(80)
>)
>/
>
>
>load data
> infile 'test.dat'
> replace
> INTO TABLE login_load
>FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
>(first_name char,
> last_name char,
> display_name char,
> login_name char,
> ex_email_address char "substr(:ex_email_address,
> (instr(:ex_email_address,
>':SMTP', 1, 1) +6), ((INSTR(:EX_EMAIL_ADDRESS, '%X400', 1,1)) -
>(instr(:ex_email_address, 'SMTP', 1, 1) +5) ))"
>)
>
>
>=== Contents of test.dat===================
>
>
>Bobby,Testing,"Bobby,Testing",btesting,"CCMAIL:Testing, Home at
>MYCOMP%:SMTP:Bobby.Testing_at_home.com%X400:c=US;a=
>;p=COMP;o=MYCOMP;s=TestingEarth;"
>Nelli,Jeddi,"Nelli, Jeddi",njeddi,"CCMAIL:Nelli, Jeddi at
>MYCOMP%:SMTP:Nelli.Jeddi_at_home.com%X400:c=US;a=
>;p=COMP;o=MYCOMP;s=Nelli?Jeddi;"
>
>=== Contents of test.dat===================
>
>
>Many Thanks
>Michael
>
>
>
Unix & MS have different ways to terminate a record.
Unix uses only a linefeed character.
MS uses both linefeed & a carriage-return.
Depending on how, what & where the CSV file was
made & transferred to the other system, problems
such as you described can occur.
On the Unix side you can "see" the contents by doing $ od -c filename.csv
HTH & YMMV! Received on Sat Jul 21 2001 - 16:27:54 CDT
![]() |
![]() |