Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Loader - negative numbers
Sally -
The answer depends partly on the format of your data that is being loaded (i.e. is it fixed format, comma delimited etc.) But a general method that could be used is to apply a format mask to the data element as part of the definition in your control file. Combine this by defining all your columns as CHAR (EXTERNAL?) - even your numeric ones - because data conversion will be done on insert.
For example:
Your loading a tableA with a column of format NUMBER(6,2) e.g.
tableA( col_a (NUMBER(6,2)
, col_b . . )
with raw data that looks like this:
123.23-,xxx
1423.54,xxxxx
1232.87-,zzzzzz etc.
In the control file
define data as comma delimited
and load with commands (i forget the exact syntax):
col_a CHAR TO_CHAR(col_a,9999.99-) ,col_b CHAR
Hope this helps.
Martyn Cavett
home: cavett_at_globalnet.co.uk
work: Martyn.Cavett_at_gtplc.com
Received on Mon Feb 10 1997 - 00:00:00 CST