Home » SQL & PL/SQL » SQL & PL/SQL » NUmeric format
NUmeric format [message #290067] Thu, 27 December 2007 05:21 Go to next message
monasingh
Messages: 229
Registered: May 2006
Location: Mumbai
Senior Member

Hi,
I have to display my quantity column in the format 999999999.99.
My qty values may be 23.9, 23456.90,345.

Please advice.

Thanks,
Mona
Re: NUmeric format [message #290070 is a reply to message #290067] Thu, 27 December 2007 05:29 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
And TO_CHAR did not help?

The formatting of numbers is normally something that is taken care of on the front end.

MHE
Re: NUmeric format [message #290071 is a reply to message #290067] Thu, 27 December 2007 05:32 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Try TO_CHAR .


[ Maaher: you are always quicker ]

Thumbs Up
Rajuvan

[Updated on: Thu, 27 December 2007 05:33]

Report message to a moderator

Re: NUmeric format [message #290100 is a reply to message #290071] Thu, 27 December 2007 07:05 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Alternatively, if you use SQL*Plus, you might try the SET NUMFORMAT as in the following example:
SQL> set numformat 999999999.99
SQL>
SQL> select 23.9 val from dual
  2  union all
  3  select 23459.90 from dual
  4  union all
  5  select 345 from dual;

          VAL
-------------
        23.90
     23459.90
       345.00

SQL>
Re: NUmeric format [message #290658 is a reply to message #290067] Mon, 31 December 2007 01:08 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,

If you want format for salary means,

column salary format 99999.9999

use like above and execute your query.

Thanks
Mano
Re: NUmeric format [message #290664 is a reply to message #290067] Mon, 31 December 2007 01:24 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Fine spmano1983,

But your query is very much specific to SQLPLUS .

Thumbs Up
Rajuvan
Re: NUmeric format [message #290678 is a reply to message #290664] Mon, 31 December 2007 01:44 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As Monasingh didn't specify tool he uses, I don't see a problem in specifying all possible variations in answering this question. Besides, he never worried about telling us whether any of previous suggestions were helpful at all.

I understand there are fire and forget missiles there (such as AGM-65 Maverick), and Monasingh's questions are just like that: fire and forget. Who knows if he ever visited this topic again.
Re: NUmeric format [message #290681 is a reply to message #290678] Mon, 31 December 2007 01:48 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
He is she. Wink
I agree she did not connect since she posted the question.

Regards
Michel

[Updated on: Mon, 31 December 2007 01:50]

Report message to a moderator

Re: NUmeric format [message #290686 is a reply to message #290681] Mon, 31 December 2007 01:56 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is she? Oh, come one, Michel! Don't believe in everything people say!

I am sorry, Mona Singh; I didn't change your sex deliberately.
Re: NUmeric format [message #290691 is a reply to message #290067] Mon, 31 December 2007 02:04 Go to previous message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Hmhm


One more Mona singh, Now it is She only Smile

Thumbs Up
Rajuvan.
Previous Topic: materialized view
Next Topic: MY$STATS TABLE PROBLEM
Goto Forum:
  


Current Time: Tue Dec 06 14:30:16 CST 2016

Total time taken to generate the page: 0.07372 seconds