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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Sql Loader Question

Re: Sql Loader Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 3 Jul 2001 17:05:12 -0700
Message-ID: <9htmjo02stp@drn.newsguy.com>

In article <20010703171507.03581.00002361_at_ng-cf1.aol.com>, larawole_at_aol.com says...
>
>I tried to load a flat file( comma, delimited) into an oracle db 8.1.5
>on Unix Server but got error
>

there is an issue with the 815 loader that it wants the last line to end with a newline.

If you just "vi" the datafile, and ":wq" it, vi will add that newline for you.

>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
>
>

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Tue Jul 03 2001 - 19:05:12 CDT

Original text of this message

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