concatenate parts of a row in sql loader [message #70327] |
Mon, 27 May 2002 03:43 |
Antoni
Messages: 8 Registered: February 2002
|
Junior Member |
|
|
Hi,
does anybody knows how to concatenate part of a row into a field?
This is my code but it is giving me problems
LOAD DATA
INFILE "/usr/users/medios/enlaces/T202_XXOXIFXX.LST"
APPEND
INTO TABLE VENTAS_FRIGO_PROVA
(
VTAS_CODCLI POSITION ( 001 : 015 ),
VTAS_SEMANA POSITION ( 031 : 037 ) "SUBSTR(RTRIM(LTRIM(:VTAS_SEMANA)),4,7)||SUBSTR(RTRIM(LTRIM(:VTAS_SEMANA)),1,2)))",
VTAS_PRODUCTO POSITION ( 016 : 030 ),
VTAS_UNIDADES POSITION ( 067 : 087 ) NULLIF VTAS_UNIDADES = BLANKS,
VTAS_GSV POSITION ( 109 : 129 ) NULLIF VTAS_GSV = BLANKS,
VTAS_TPR POSITION ( 151 : 171 ) NULLIF VTAS_TPR = BLANKS,
VTAS_LITONS POSITION ( 046 : 066 ) NULLIF VTAS_LITONS = BLANKS
)
I have this kind of data in the data field:
20_2002 and I want to insert 200220 in vtas_semana.
The code above it is not working i got
ORA-00947: not enough values
thanks in advance
|
|
|
|