My datafile contains numeric values such as the following:
+000000000376.04
-000000000154.70
The following entry is in my ctl file,
AMOUNT_BALANCE POSITION(133:148) DECIMAL (14,2)
, which according to the documentation, should work.
but this is what I get:
ORA-02357: Packed Decimal conversion error
ORA-07409: slpdtb: invalid packed decimal nibble.
Record 99975: Rejected - Error on table TEST.TABLE1, column AMOUNT_BALANCE
Any help with this is appreciated.
Thanks,
Here is from the manual at tahiti.oracle.com (note the words below "These
datatypes are the human-readable, character form of numeric data")
Numeric EXTERNAL
The numeric EXTERNAL datatypes are the numeric datatypes (INTEGER, FLOAT,
DECIMAL, and ZONED) specified with the EXTERNAL keyword, with optional
length and delimiter specifications.
These datatypes are the human-readable, character form of numeric data.
Numeric EXTERNAL may be specified with lengths and delimiters, just like
CHAR data. Length is optional, but if specified, overrides position.
The syntax for the numeric EXTERNAL datatypes is shown as part of
datatype_spec.
Note: The data is a number in character form, not binary representation.
Therefore, these datatypes are identical to CHAR and are treated
identically, except for the use of DEFAULTIF. If you want the default to be
null, use CHAR; if you want it to be zero, use EXTERNAL. See also Setting a
Column to Null or Zero and DEFAULTIF Clause.
FLOAT EXTERNAL data can be given in either scientific or regular notation.
Both "5.33" and "533E-2" are valid representations of the same value.
"Andre Norman" <andre....@sympatico.ca> wrote in message
news:3RwBa.6278$y77.6...@news20.bellglobal.com...
The question remains unanswered. Surely someone has tried to load these
types of values into a number field using sqlldr with the direct=true
option....anyone???
Perhaps there is a way to use FLOAT but how do I change the 4 in the warning
above?
Regards,
Andre
"Scott Mattes" <Sc...@TheMattesFamily.ws> wrote in message
news:MjxBa.1285$cp6.9...@news1.news.adelphia.net...
Bye,
Flavio
create table test_dec (num1 number(14,2), num2 number(14,2));
---- version 1
load data
infile *
into table test_dec
truncate
FIELDS TERMINATED BY ','
(num1 DECIMAL EXTERNAL,
num2 FLOAT EXTERNAL
)
BEGINDATA
+000000000376.04, -000000000154.70
-000000000376.03, +000000000154.71
--- version 2
load data
infile *
into table test_dec
truncate
(num1 POSITION(1:16) DECIMAL EXTERNAL,
num2 POSITION(17:32) FLOAT EXTERNAL
)
BEGINDATA
+000000000376.04-000000000154.70
-000000000376.03+000000000154.71
"FC" <fla...@tin.it> wrote in message
news:bbkCa.25139$pR3.5...@news1.tin.it...