Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> SQL*Loader question
I have a formated file with 15 bytes records.
Each record is a string with a number in spanish format, right
justified. The last byte contains
space for positive numbers, "-" for negative numbers. "," is the decimal
separator,
"." is the thousands separator.
In TEST table, FIELD_A is DECIMAL NOT NULL NUMBER(15,2)
This control file work fine:
LOAD DATA
INFILE LOAD.DAT
APPEND
INTO TABLE TEST
(FIELD_A POSITION(1:15) DECIMAL EXTERNAL "DECODE(SUBSTR(:FIELD_A, 15,
1), '-', -1, 1) * TRANSLATE(REPLACE(SUBSTR(:FIELD_A, 1, 14), '.'), ',',
'.')")
It's possible load data with a simplified control file? Received on Mon Feb 26 2001 - 13:05:13 CST