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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Loader Syntax Problem

Re: SQL*Loader Syntax Problem

From: GHouck <hksys_at_teleport.com>
Date: Mon, 05 Oct 1998 08:37:49 GMT
Message-ID: <3618855B.63F@teleport.com>


Stephen Earl wrote:
>
> Hello All,
>
> I'm trying to load two tables from a single
> delimited control file and I'm getting the
> following error:
>
> SQL*Loader-350: Syntax error at line 8.
> Expecting quoted string or hex identifier, found
> "1".
> WHEN recid = 1
> ^
>
> Here's the control file contents:
>
> LOAD DATA
>
> INFILE *
>
> APPEND
>
> INTO TABLE x_headers
> WHEN recid = 1
> FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
> (recid INTEGER,
> order_number CHAR,
> customer_id,
> ship_to_id,
> invoice_to_id)
>
> INTO TABLE x_lines
> WHEN recid = 2
> FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY
> '"'
> (recid POSITION(1) INTEGER,
> order_number CHAR,
> line_number INTEGER,
> sku CHAR,
> quantity INTEGER)
>
> BEGINDATA
> 1,1234,4444,5555,6666
> 2,1234,1,"RFX-8601",10
> 2,1234,2,"RFZ-8401",20
> 2,1234,3,"RFQ-8201",5
> 1,9943,4444,5555,6666
> 2,9943,1,"RFX-8601",10
> 2,9943,2,"RFZ-8401",20
> 2,9943,3,"RFQ-8201",5
>
> Neither table has a "recid" field. Can anyone
> point out what is wrong with the current syntax???
>

Stephen,

Could it be your use of quotes instead of apostrophes around the comma (",") ? I don't have the documents handy, but the examples use apostrophes (actually, all but one, so it may still be legal).

Just a thought,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Mon Oct 05 1998 - 03:37:49 CDT

Original text of this message

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