help with control file [message #368233] |
Fri, 06 October 2000 12:16 |
Nuno Freitas
Messages: 1 Registered: October 2000
|
Junior Member |
|
|
I having some problem, to load text files to Oracle 7.34.
The error message is this :
SQL*Loader-401: End field position 4 must be greater than or equal to start 12
The control file is this :
LOAD DATA
INFILE 'Expz8p1_2.DAT'
REPLACE
INTO TABLE EXPURGO.INCAPACIDADE_PESSOA_SIN
(N_SINISTRO position(1:10) CHAR,
COMPANHIA position(12:4),
N_SUB_SINISTRO position(17:3) INTEGER EXTERNAL(3),
ALTERACAO_DT position(21:19) Date(19) "yyyy-mm-dd hh24:mi:ss",
ALTERACAO_USER position(41:8),
INICIO_INCAP position(50:10) date(10) "yyyy-mm-dd",
TIPO_INCAP position(61:3),
PERC_INCAP position(65:15) INTEGER EXTERNAL(5) "999.99",
REG_TRAT position(81:1),
LOCAL_TRAT position(83:1)).
Above is a example of a line of the table :
90AU100607,1006,001,1996-02-13 11:34:26,AU1621 ,1990-07-30,ITA,+00000000000.00,A,H
The format of the table is :
N_SINISTRO CHAR(10),
COMPANHIA CHAR(4),
N_SUB_SINISTRO NUMBER(3),
ALTERACAO_DT DATE,
ALTERACAO_USER VARCHAR2(8),
INICIO_INCAP DATE,
TIPO_INCAP CHAR(3),
PERC_INCAP NUMBER(5,2),
REG_TRAT CHAR(1),
LOCAL_TRAT CHAR(1)
I am new in working with oracle, so if some one could help me, thanks.
i
|
|
|
Re: help with control file [message #368235 is a reply to message #368233] |
Fri, 06 October 2000 12:59 |
Bala
Messages: 205 Registered: November 1999
|
Senior Member |
|
|
Hi,
The error message is self explaining,
the position takes two parameters the starting and ending. And not the starting and the length.
It should be position(12:16)
position(17:20) etc.......
Good Luck
Bala
|
|
|