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
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)
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
Received on Thu Oct 22 1998 - 15:53:05 CDT