Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using SQL*loader to load comma delimited data
In article <362f99bb.27729983_at_dcsun4.us.oracle.com>,
clbeck_at_us.oracle.com wrote:
> On Thu, 22 Oct 1998 17:43:04 GMT, sanjayraj6844_at_my-dejanews.com wrote:
>
> >I Need urgent help in using SQL*Loader to load data into a table. I have a
> >comma delimited file ( having approximately 1 million records). Some data in
> >Some of the fields have a comma as data. For Example: A record( 9 fields) is
> >like
> >
> >-1001652147,Farm, A - Pvt Organization,415 DEER AVENUE,,MANHATTAN
> >BEACH,90254,CA,9871111111,Pvt Org
> >
> >Here "Farm, A - Pvt Practice" is a single field but has a comma(,) as data
> >
> >My control file looks like
> >
> >load data
> >infile "/home/rajs/npecmap.dat"
> >into table NPECMAP1
> >fields terminated by ','
> >(field1,field2,field3,.....,field9)
> >
> >I can use another delimiter but I want to know how it can be done even with
> >comma (,) as a delimiter.
>
> If you want to use a comma as the delimiter and you data may contain
> commas then you can put double quotes around the fields.
>
> load data
> infile "/home/rajs/npecmap.dat"
> into table NPECMAP1
> fields terminated by ',' optionally inclosed by '"'
> (field1,field2,field3,.....,field9)
>
Although it should be -> otionally enclosed by
Regards
> with data like
>
> -1001652147,"Farm, A - Pvt Organization",415 DEER AVENUE,,MANHATTAN
> BEACH,90254,CA,9871111111,Pvt Org
>
> chris.
>
> >
> >Thanks in advance
> >
> >-----== Posted via Deja News, The Leader in Internet Discussion ==-----
> >http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
>
--
Oliver Willandsen
European Commission
http://europa.eu.int
All comments represent my own opinion and may not in any circumstance be regarded as stating an official position of the European Commission
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Oct 23 1998 - 02:48:01 CDT