Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL LOADER POSITIONS (X, X) - HOW /WHENTO USE
"Val" <vegas_girlie_at_hotmail.com> schrieb im Newsbeitrag
news:7d04f924.0306270947.39edfcc_at_posting.google.com...
> The below is my control file. Unfortunately the dat file is a fixed
> format with extra padding in the fields if there are spaces.
> LOAD DATA
> INFILE 'test.dat'
> BADFILE 'test.bad'
> DISCARDFILE 'test.dsc'
>
> INTO TABLE "test"
> INSERT
>
> FIELDS TERMINATED BY '|'
> TRAILING NULLCOLS
>
> (a position (1:11),
> b position (13:56),
> c position (58:77),
> d position (79:100),
> e position (102:123),
> f position (125:127),
> g position (129:134),
> h position (136:157),
> i position (159:169) DATE 'YYYY/MM/DD',
> j position (171:180) DATE 'YYYY/MM/DD',
> k position (182:191),
> l position (193:205))
>
>
> this is the error message that I get:
>
>
> SQL*Loader: Release 9.2.0.3.0 - Production on Thu Jun 26 21:57:48 2003
>
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
> SQL*Loader-350: Syntax error at line 20.
> Expecting "," or ")", found keyword position.
> i DATE position (159:169) DATE 'YYYY/MM/DD',
As I understand the SQLLDR docs: if you define the TERMINATED BY clause AND the position syntax, sqlldr searches (in your case for column a) position 1 to 11 for a '|'. If it doesn't find one, it generates an error. It seems to me that this character occurs on position 12.
Maybe posting of some data records will be helpful. Received on Mon Jun 30 2003 - 06:22:05 CDT
![]() |
![]() |