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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Implied decimal points in external tables

Re: Implied decimal points in external tables

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Wed, 01 Sep 2004 21:27:42 -0700
Message-ID: <1094099320.616340@yasure>


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

Original text of this message

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