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: help formatting a string to number

Re: help formatting a string to number

From: <bpena_at_my-dejanews.com>
Date: 1998/09/14
Message-ID: <6tjm6t$cbc$1@nnrp1.dejanews.com>#1/1

The format command uses the "V" as a multiplier, not as the implied decimal as in COBOL (at least this is my understanding of it.) To get your desired effect, format it as 999999999999.999999 (that's 12.6) and divide your field by 100000 in the select statement. SELECT field1, yourfield/100000, ...

Hope this helps,

Brian

In article <35FA7BDE.CD2A5C31_at_pine.vpcc.sunysb.edu>,   dlogiudice_at_pine.vpcc.sunysb.edu wrote:
> I have an input file with field the has a field
> description of 12v6 (12digits)implied decimal (6 digits)
> If I look at the data it looks like this
> 555555555555123456.
> I am trying to load this into an oracle db. The field on
> the table is also 12v6. I am getting an oracle error
> because the the field is being loaded with all 18 digits
> to the left of the decimal.
> How do I format it as 555555555555.123456
> thanks
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Mon Sep 14 1998 - 00:00:00 CDT

Original text of this message

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