Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Implied decimal points in external tables
Phil Bewig wrote:
> I want to load data via an external table. One field
> in the table is defined
>
> trans_amt number(13,2)
>
> The external table is fixed width and the amount is
> stored filled with leading zeros and an implied
> two-digits behind the decimal point. For instance,
> the number 12,345.67 is stored in the
> external table as
>
> 0000001234567
>
> With SQL*Loader I can define the field as
>
> trans_amt position(135:147) ":trans_amt/100"
>
> but that doesn't work with external tables. I've played
> with decimal, zoned, and external but don't yet know how
> to properly read that number.
>
> Can anyone help?
>
> Many thanks,
>
> Phil
If it starts with a zero it isn't a number ... it is a string. Read it as a string and then if you want to lose the zeros cast it to a number.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Wed Sep 01 2004 - 23:27:42 CDT