Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: use of "B" in format models

Re: use of "B" in format models

From: Michel Cadot <micadot_at_netcourrier.com>
Date: 2000/05/17
Message-ID: <8ftj6j$2k2c$1@news4.isdnet.net>#1/1

format model element B returns blanks for the integer part of a fixed point number when the integer part is zero (regardless of "0"s in the format model). If number is not zero, it has no effect.

v734> select to_char(0,'B999999') from dual;

TO_CHAR


1 row selected.

v734> select to_char(0,'999999') from dual;

TO_CHAR


      0

1 row selected.

v734> select to_char(0,'B00000') from dual;

TO_CHA


1 row selected.

v734> select to_char(0,'00000') from dual;

TO_CHA



 00000

1 row selected.

v734> select to_char(12,'B999999') nb from dual;

NB


     12

1 row selected.

v734> select to_char(12,'999999') nb from dual;

NB


     12

1 row selected.

--
Have a nice day
Michel


Jack Reid <jreid_at_stirlingonline.com> a écrit dans le message :
3921AFEB.3A2F9BBC_at_stirlingonline.com...

> Can anyone show a couple of examples of the character "B" being used
> with the TO_CHAR function to reformat a numeric value? I have tried this
> a bunch of ways but can't see how it alters the regular behavior of
> formatting via 9's and/or 0's.
>
> Thanks.
>
Received on Wed May 17 2000 - 00:00:00 CDT

Original text of this message

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