Re: SQl Loader 305 Error
Date: 2000/06/30
Message-ID: <8jikk5$hci$1_at_nnrp1.deja.com>#1/1
Thanks to Tom Kyte.
I can use a rtrim function to do the same instead of hardcoding the
length
like
contrib_amt POSITION(21:35) DECIMAL EXTERNAL "decode (substr (:contrib_amt,length(:contrib_amt)),'-',-to_number(rtrim(:contrib_amt,'- ')/100),
to_number(rtrim(:contrib_amt,'-')/100))"
Thanks - kasthuri
In article <8jigfh$e1i$1_at_nnrp1.deja.com>,
kasthuri_at_viisage.com wrote:
> Hi,
>
> I have resolved it by using a different logic for inserting the
> decimal point -
> contrib_amt POSITION(21:35) DECIMAL EXTERNAL "decode
> (substr
> (:contrib_amt,length(:contrib_amt)),'-',-to_number(substr
> (:contrib_amt,1,13)/100
> ), to_number(substr(:contrib_amt,1,13)/100))"
>
> - where the position and length is hard coded.
> Thanks
> Kasthuri.J
>
> In article <8jie90$c7k$1_at_nnrp1.deja.com>,
> kasthuri_at_viisage.com wrote:
> > Hi All,
> >
> > I have an amt column in my table which is NUMBER(11,2). The input
data
> > contains a trailing negative sign and doesnt contain decimal
points. i
> > have something like this in my control file. But i get an error
saying
> > that the token is longer than allowable 258 char. I dont know how i
can
> > further reduce it. Is there any other way of doing it?
> > Any suggestions would help.
> >
> > Control file:
> >
> > contrib_amt POSITION(21:35) DECIMAL EXTERNAL "decode
> > (substr(:contrib_amt,length(:contrib_amt)),'-',-to_number(substr
> > (:contrib_amt,1,length(:contrib_amt)-3)||'.'||substr
(:contrib_amt,length
> > (:contrib_amt)-3,2)),to_number(
> > substr(:contrib_amt,1,length(:contrib_amt)-3)||'.'||substr
> > (:contrib_amt,length(:contrib_amt)-3,2)))"
> >
> > - I tried with Zoned also. it didnt work. gave me an 'invalid zoned
> > decimal nibble'
> >
> > Thanks & Regards
> > J.Kasthuri
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> --
> Kasthuri Jegatheesan
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
-- Kasthuri Jegatheesan Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri Jun 30 2000 - 00:00:00 CEST