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

Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlload, mission impossible ?

Re: sqlload, mission impossible ?

From: Allen Kirby <akirby_at_att.com>
Date: 1997/01/02
Message-ID: <32CBDBF6.3B5B@att.com>#1/1

Salman Mughal wrote:
>
 

> We have been trying to load a file with lots of lines line the following :
>
> "423567","I would not touch it with a 10" stick","35",
>
> LOAD
> INFILE 'temp.txt'
> TERMINATED BY ',' ENCLOSED BY '"'
> INTO TABLE testdb
> ( Part_Number ,
> Description ,
> Available )
>
> But keep getting the following error :
>
> No terminator found after TERMINATED and ENCLOSED field
>
 

>
> Salman Mughal
> salman_at_netdoor.com

I think it's either the " in 10" - which looks like the end of the field - or the trailing comma at the end of the line. It's probably the ", but try deleting the trailing comma first since this will only take a few minutes on a test file. To fix the ", you'll either have to change the " in 10" and each similar occurrence to something else in the input file and translate it later or change the ENCLOSED character and modify the input file. If you're on Unix, this is easily done with sed or vi. If you're on NT, your guess is as good as mine as to how to do this. Changing the ENCLOSED char would involve the following steps (in ed notation):

s/^"/'/		change the beginning delimiter on the line
s/","/','/g	change the rest of the delimeters (g means global)
And if you need the trailing comma:
s/",/',		change the last delimeter

Remember to change the ENCLOSED parameter in the control file. Good Luck.

-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Thu Jan 02 1997 - 00:00:00 CST

Original text of this message

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