Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> SQL*Loader problem
I have a formated file. Each record is a fix-length string (15 chars)
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 - 17:10:54 CST