RE: How to display FLOAT in 99999.999 format

2003-08-01 Thread Odland, Brad
Cripes...I wasn't adding the format and just doing a straight TO_CHAR.


ghh.

Thanks people






-Original Message-
Sent: Friday, August 01, 2003 1:49 PM
To: Multiple recipients of list ORACLE-L


Try 9.000 instead.

- Kirti


--- "Odland, Brad" <[EMAIL PROTECTED]> wrote:
> Tried that.
> 
> 1234.1 won't show the trailing zeros...
> 
> 
> 
> -Original Message-
> Sent: Friday, August 01, 2003 1:19 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Not sure if this is the best way but you could do something like SELECT
> TO_CHAR(1,'999.999') FROM DUAL;
> 
> Only drawback that I have been running into is if you don't allot of
enough
> spaces before the decimal it display a value of .
> 
> Hope this helps.
> 
> - Original Message - 
> To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
> Sent: Friday, August 01, 2003 12:14 PM
> 
> 
> > How do I force display of a FLOAT
> >
> > in a format like
> >
> > Original number  Result
> > 1234.34 1234.340
> > 12345.456 12345.456
> > 123.1  123.100
> > 123123.000
> >
> >
> > The dev on a project wants to preformat the data for a report on the
> > database side.
> >
> > He wants 3 places after the decimal to display even if the number is a
> whole
> > number
> >
> > (I know most VB report controls do this easilybut...)
> >
> > I thought it was complicated as it would require a to_char with format
> > description then searching for the postion of the decimal and then
moving
> > from there to the right counting the characters if the number of
> characters
> > to the right of the decimal was < 3 then pad with zeros...
> >
> > I messed around with RPAD, TRUNC, ROUND and TO_CHAR and found I was not
> able
> > handle all cases of possible significant digits.
> >
> > Sounded like a complicated function to do something thats automagic in a
> > reporting control. Or am I forgetting a oracle functionor fomat?
> >
> > This is 8.1.7
> >
> > I told the developer to use the field formatting contols of his
reporting
> > control because the additional zeros padded in a number are basically
> > meaningless in a database and mathematical operations.
> >
> > Brad O.
> >
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > -- 
> > Author: Odland, Brad
> >   INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> > San Diego, California-- Mailing list and web hosting services
> > -
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> >
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Jay
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kirtikumar Deshpande
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the 

RE: How to display FLOAT in 99999.999 format

2003-08-01 Thread Sarnowski, Chris

use a 0 instead of a 9 for leading/trailing zeroes.

SQL>select to_char(123.45, '999.990') from dual;

TO_CHAR(

 123.450

SQL>select to_char(123.45678, '999.990') from dual;

TO_CHAR(

 123.457

SQL>select to_char(123.45, '0999.990') from dual;

TO_CHAR(1
-
 0123.450

> -Original Message-
> From: Odland, Brad [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 01, 2003 2:39 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: How to display FLOAT in 9.999 format
> 
> 
> Tried that.
> 
> 1234.1 won't show the trailing zeros...
> 
> 
> 
> -Original Message-
> Sent: Friday, August 01, 2003 1:19 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Not sure if this is the best way but you could do something 
> like SELECT
> TO_CHAR(1,'999.999') FROM DUAL;
> 
> Only drawback that I have been running into is if you don't 
> allot of enough
> spaces before the decimal it display a value of .
> 
> Hope this helps.
> 
> - Original Message - 
> To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
> Sent: Friday, August 01, 2003 12:14 PM
> 
> 
> > How do I force display of a FLOAT
> >
> > in a format like
> >
> > Original number  Result
> > 1234.34 1234.340
> > 12345.456 12345.456
> > 123.1  123.100
> > 123123.000
> >
> >
> > The dev on a project wants to preformat the data for a report on the
> > database side.
> >
> > He wants 3 places after the decimal to display even if the 
> number is a
> whole
> > number
> >
> > (I know most VB report controls do this easilybut...)
> >
> > I thought it was complicated as it would require a to_char 
> with format
> > description then searching for the postion of the decimal 
> and then moving
> > from there to the right counting the characters if the number of
> characters
> > to the right of the decimal was < 3 then pad with zeros...
> >
> > I messed around with RPAD, TRUNC, ROUND and TO_CHAR and 
> found I was not
> able
> > handle all cases of possible significant digits.
> >
> > Sounded like a complicated function to do something thats 
> automagic in a
> > reporting control. Or am I forgetting a oracle functionor fomat?
> >
> > This is 8.1.7
> >
> > I told the developer to use the field formatting contols of 
> his reporting
> > control because the additional zeros padded in a number are 
> basically
> > meaningless in a database and mathematical operations.
> >
> > Brad O.
> >
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > -- 
> > Author: Odland, Brad
> >   INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> > San Diego, California-- Mailing list and web 
> hosting services
> > 
> -
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> >
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Jay
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in

RE: How to display FLOAT in 99999.999 format

2003-08-01 Thread Kevin Toepke
SQL> select to_char(1234.4, '0.000') from dual;

TO_CHAR(12
--
  1234.400

-Original Message-
Sent: Friday, August 01, 2003 2:39 PM
To: Multiple recipients of list ORACLE-L


Tried that.

1234.1 won't show the trailing zeros...



-Original Message-
Sent: Friday, August 01, 2003 1:19 PM
To: Multiple recipients of list ORACLE-L


Not sure if this is the best way but you could do something like SELECT
TO_CHAR(1,'999.999') FROM DUAL;

Only drawback that I have been running into is if you don't allot of enough
spaces before the decimal it display a value of .

Hope this helps.

- Original Message - 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 12:14 PM


> How do I force display of a FLOAT
>
> in a format like
>
> Original number  Result
> 1234.34 1234.340
> 12345.456 12345.456
> 123.1  123.100
> 123123.000
>
>
> The dev on a project wants to preformat the data for a report on the
> database side.
>
> He wants 3 places after the decimal to display even if the number is a
whole
> number
>
> (I know most VB report controls do this easilybut...)
>
> I thought it was complicated as it would require a to_char with format
> description then searching for the postion of the decimal and then moving
> from there to the right counting the characters if the number of
characters
> to the right of the decimal was < 3 then pad with zeros...
>
> I messed around with RPAD, TRUNC, ROUND and TO_CHAR and found I was not
able
> handle all cases of possible significant digits.
>
> Sounded like a complicated function to do something thats automagic in a
> reporting control. Or am I forgetting a oracle functionor fomat?
>
> This is 8.1.7
>
> I told the developer to use the field formatting contols of his reporting
> control because the additional zeros padded in a number are basically
> meaningless in a database and mathematical operations.
>
> Brad O.
>
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Odland, Brad
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kevin Toepke
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: How to display FLOAT in 99999.999 format

2003-08-01 Thread Jay Wade
Could it be something with the program you are executing it from?
When I ran the 1234.1 in SQL*Plus I got the below.  I'll see if I can dig up 
another formatting optoin.

[EMAIL PROTECTED]:SQL> select TO_CHAR(1234.1,'9.999') FROM DUAL;

TO_CHAR(12
--
 1234.100
[EMAIL PROTECTED]:SQL>



From: "Odland, Brad" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Subject: RE: How to display FLOAT in  9.999 format
Date: Fri, 01 Aug 2003 10:39:24 -0800
Tried that.

1234.1 won't show the trailing zeros...



-Original Message-
Sent: Friday, August 01, 2003 1:19 PM
To: Multiple recipients of list ORACLE-L
Not sure if this is the best way but you could do something like SELECT
TO_CHAR(1,'999.999') FROM DUAL;
Only drawback that I have been running into is if you don't allot of enough
spaces before the decimal it display a value of .
Hope this helps.

- Original Message -
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 12:14 PM
> How do I force display of a FLOAT
>
> in a format like
>
> Original number  Result
> 1234.34 1234.340
> 12345.456 12345.456
> 123.1  123.100
> 123123.000
>
>
> The dev on a project wants to preformat the data for a report on the
> database side.
>
> He wants 3 places after the decimal to display even if the number is a
whole
> number
>
> (I know most VB report controls do this easilybut...)
>
> I thought it was complicated as it would require a to_char with format
> description then searching for the postion of the decimal and then 
moving
> from there to the right counting the characters if the number of
characters
> to the right of the decimal was < 3 then pad with zeros...
>
> I messed around with RPAD, TRUNC, ROUND and TO_CHAR and found I was not
able
> handle all cases of possible significant digits.
>
> Sounded like a complicated function to do something thats automagic in a
> reporting control. Or am I forgetting a oracle functionor fomat?
>
> This is 8.1.7
>
> I told the developer to use the field formatting contols of his 
reporting
> control because the additional zeros padded in a number are basically
> meaningless in a database and mathematical operations.
>
> Brad O.
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Odland, Brad
  INET: [EMAIL PROTECTED]
Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jay Wade
 INET: [EMAIL PROTECTED]
Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hostin

RE: How to display FLOAT in 99999.999 format

2003-08-01 Thread Kirtikumar Deshpande
Try 9.000 instead.

- Kirti


--- "Odland, Brad" <[EMAIL PROTECTED]> wrote:
> Tried that.
> 
> 1234.1 won't show the trailing zeros...
> 
> 
> 
> -Original Message-
> Sent: Friday, August 01, 2003 1:19 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Not sure if this is the best way but you could do something like SELECT
> TO_CHAR(1,'999.999') FROM DUAL;
> 
> Only drawback that I have been running into is if you don't allot of enough
> spaces before the decimal it display a value of .
> 
> Hope this helps.
> 
> - Original Message - 
> To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
> Sent: Friday, August 01, 2003 12:14 PM
> 
> 
> > How do I force display of a FLOAT
> >
> > in a format like
> >
> > Original number  Result
> > 1234.34 1234.340
> > 12345.456 12345.456
> > 123.1  123.100
> > 123123.000
> >
> >
> > The dev on a project wants to preformat the data for a report on the
> > database side.
> >
> > He wants 3 places after the decimal to display even if the number is a
> whole
> > number
> >
> > (I know most VB report controls do this easilybut...)
> >
> > I thought it was complicated as it would require a to_char with format
> > description then searching for the postion of the decimal and then moving
> > from there to the right counting the characters if the number of
> characters
> > to the right of the decimal was < 3 then pad with zeros...
> >
> > I messed around with RPAD, TRUNC, ROUND and TO_CHAR and found I was not
> able
> > handle all cases of possible significant digits.
> >
> > Sounded like a complicated function to do something thats automagic in a
> > reporting control. Or am I forgetting a oracle functionor fomat?
> >
> > This is 8.1.7
> >
> > I told the developer to use the field formatting contols of his reporting
> > control because the additional zeros padded in a number are basically
> > meaningless in a database and mathematical operations.
> >
> > Brad O.
> >
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > -- 
> > Author: Odland, Brad
> >   INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> > San Diego, California-- Mailing list and web hosting services
> > -
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> >
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Jay
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kirtikumar Deshpande
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: How to display FLOAT in 99999.999 format

2003-08-01 Thread Odland, Brad
Tried that.

1234.1 won't show the trailing zeros...



-Original Message-
Sent: Friday, August 01, 2003 1:19 PM
To: Multiple recipients of list ORACLE-L


Not sure if this is the best way but you could do something like SELECT
TO_CHAR(1,'999.999') FROM DUAL;

Only drawback that I have been running into is if you don't allot of enough
spaces before the decimal it display a value of .

Hope this helps.

- Original Message - 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 12:14 PM


> How do I force display of a FLOAT
>
> in a format like
>
> Original number  Result
> 1234.34 1234.340
> 12345.456 12345.456
> 123.1  123.100
> 123123.000
>
>
> The dev on a project wants to preformat the data for a report on the
> database side.
>
> He wants 3 places after the decimal to display even if the number is a
whole
> number
>
> (I know most VB report controls do this easilybut...)
>
> I thought it was complicated as it would require a to_char with format
> description then searching for the postion of the decimal and then moving
> from there to the right counting the characters if the number of
characters
> to the right of the decimal was < 3 then pad with zeros...
>
> I messed around with RPAD, TRUNC, ROUND and TO_CHAR and found I was not
able
> handle all cases of possible significant digits.
>
> Sounded like a complicated function to do something thats automagic in a
> reporting control. Or am I forgetting a oracle functionor fomat?
>
> This is 8.1.7
>
> I told the developer to use the field formatting contols of his reporting
> control because the additional zeros padded in a number are basically
> meaningless in a database and mathematical operations.
>
> Brad O.
>
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Odland, Brad
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: How to display FLOAT in 99999.999 format

2003-08-01 Thread Jay
Not sure if this is the best way but you could do something like SELECT
TO_CHAR(1,'999.999') FROM DUAL;

Only drawback that I have been running into is if you don't allot of enough
spaces before the decimal it display a value of .

Hope this helps.

- Original Message - 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 12:14 PM


> How do I force display of a FLOAT
>
> in a format like
>
> Original number  Result
> 1234.34 1234.340
> 12345.456 12345.456
> 123.1  123.100
> 123123.000
>
>
> The dev on a project wants to preformat the data for a report on the
> database side.
>
> He wants 3 places after the decimal to display even if the number is a
whole
> number
>
> (I know most VB report controls do this easilybut...)
>
> I thought it was complicated as it would require a to_char with format
> description then searching for the postion of the decimal and then moving
> from there to the right counting the characters if the number of
characters
> to the right of the decimal was < 3 then pad with zeros...
>
> I messed around with RPAD, TRUNC, ROUND and TO_CHAR and found I was not
able
> handle all cases of possible significant digits.
>
> Sounded like a complicated function to do something thats automagic in a
> reporting control. Or am I forgetting a oracle functionor fomat?
>
> This is 8.1.7
>
> I told the developer to use the field formatting contols of his reporting
> control because the additional zeros padded in a number are basically
> meaningless in a database and mathematical operations.
>
> Brad O.
>
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Odland, Brad
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).