Home » SQL & PL/SQL » SQL & PL/SQL » Format problem........
icon5.gif  Format problem........ [message #247462] Tue, 26 June 2007 00:35 Go to next message
lokhande.dinesh29
Messages: 36
Registered: May 2007
Member
Hi All,

I want to print number 65746 in this format 657-46.
What will be the way for this...?

Regards,
Din
Re: Format problem........ [message #247464 is a reply to message #247462] Tue, 26 June 2007 00:44 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Here are the steps I followed:
1) I show how to use a format mask using group separator
2) I show how to (normally) redefine the symbol used for group- and decimal separator
3) I use the symbol '-' as group separator
SQL> select to_char(12345, '999G99') from dual;

TO_CHAR
-------
 123,45

SQL> select to_char(12345, '999G99', 'nls_numeric_characters='',.''') from dual;

TO_CHAR
-------
 123.45

SQL> select to_char(12345, '999G99', 'nls_numeric_characters='',-''') from dual;

TO_CHAR
-------
 123-45
Previous Topic: need to merge the records
Next Topic: to know table name of specific data
Goto Forum:
  


Current Time: Sat Dec 10 14:49:18 CST 2016

Total time taken to generate the page: 0.11868 seconds