Re: SQL*Plus / PLSQL Formatting

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 29 Jan 1999 18:27:27 GMT
Message-ID: <36befd69.20528117_at_192.86.155.100>


A copy of this was sent to tkyte_at_us.oracle.com (Thomas Kyte) (if that email address didn't require changing) On Fri, 29 Jan 1999 18:16:13 GMT, you wrote:

>A copy of this was sent to "Don Miller" <dmiller_at_nsf.org>
>(if that email address didn't require changing)
>On Fri, 29 Jan 1999 13:06:28 -0800, you wrote:
>
>>I have a number that is being displayed with TO_CHAR.
>>
>>TO_CHAR( 0.001 ) = .001
>>TO_CHAR( 0.001, '0D9999999999' ) = 0.0010000000
>>TO_CHAR( 0.001, '0D0000000000' ) = 0.0010000000
>>
>>I want the left side of the decimal to at least display a zero; however, I
>>want the right side of the decimal to display a floating decimal. Any ideas
>>on how I can achieve this?
>>
>>Don
>>dmiller_at_nsf.org
>>
>

in retrospect, another way to do this is:

  1* select TO_CHAR( 0.001, 'fm0D9999999999' ) from dual   2 /

TO_CHAR(0.001



0.001

>
>something like this:
>
> 1* select rtrim( TO_CHAR( 0.001, '0D9999999999' ), '0' ) from dual
>SQL> /
>
>might be what you want (hard to tell, i don't really know what you mean by a
>floating decimal on the right side of the decimal...)
>
>
>Thomas Kyte
>tkyte_at_us.oracle.com
>Oracle Service Industries
>Reston, VA USA
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
 
Anti-Anti Spam Msg: if you want an answer emailed to you, 
you have to make it easy to get email to you.  Any bounced
email will be treated the same way i treat SPAM-- I delete it.
Received on Fri Jan 29 1999 - 19:27:27 CET

Original text of this message