Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> SQL*Loader problem

SQL*Loader problem

From: Miguel Camba <mcambab_at_100mbps.es>
Date: Tue, 27 Feb 2001 00:10:54 +0100
Message-ID: <3A9AE27E.3230D376@100mbps.es>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US