Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Number Conversion Problems...Scientific Notation!
Hi Mark,
Try to_char(x) instead of to_char(x,20). This solution will not pad string with spaces at left or at right.
Andrew Protasov
Mark Tortolano wrote in message <356c4880.30373300_at_news.supernews.com>...
>Hi,
>
>I have a NUMBER(20) field in a table that I use to hold a unique
>identifier for each row. However, whenever the numbers get beyond a
>certain length, Oracle represents them in scientific notation, like
>so:-
>
>1.0120E+15
>
>when the number is actually:-
>
>1012049377441410
>
>
>This is giving me a real problem, as I need to get hold of the full
>number. I then tried to use TO_CHAR(field_name,20), which appeared to
>give the correct results in my view. When I used DBI to interface to
>Perl, though, I found that the results of the TO_CHAR mean that the
>number was padded with lots of spaces on the left side, ie.
>
>' 1012049377441410'
>
>This is no good either. Does anyone know how I can get the full number
>without having the leading spaces?
>
>Thanks in advance,
>
>Mark Tortolano
>
>
Received on Thu May 28 1998 - 02:24:43 CDT
![]() |
![]() |