Home » Developer & Programmer » Forms » THOUSANDSCHAR and DECIMALCHAR (Developer 10g)
THOUSANDSCHAR and DECIMALCHAR [message #386100] Thu, 12 February 2009 12:16 Go to next message
khmba
Messages: 19
Registered: October 2006
Junior Member
Hi
How to apply the format mask to give the output like the below:

quantity number(10.1)

Examples for quantity output
20.5
100.7
1000.6

Total number(10.2)
Examples for Total output
100.75
12,750.50
130,450.50
63,181,743.50

Help me .

Re: THOUSANDSCHAR and DECIMALCHAR [message #386117 is a reply to message #386100] Thu, 12 February 2009 14:54 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Something like this?
SQL> select to_char(100.7, '9990D0') result from dual
  2  union
  3  select to_char(130450.5, '999G990D00') result from dual;

RESULT
-----------
  100.7
 130,450.50

SQL>
Re: THOUSANDSCHAR and DECIMALCHAR [message #386480 is a reply to message #386117] Sun, 15 February 2009 11:25 Go to previous messageGo to next message
khmba
Messages: 19
Registered: October 2006
Junior Member
Thank you littlefoot
and sorry for late

What about format mask in form

I put format like that
9990.0 the result 100,5 (i want 100.5)

99,999,999.00 the result 120,183,5 (i want 120,183.5 )

Thank you again
Re: THOUSANDSCHAR and DECIMALCHAR [message #386481 is a reply to message #386480] Sun, 15 February 2009 12:56 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Pay more attention to format mask I have used. If you do that, you'll see that I have not explicitly specified , or . but have, instead, used G and D (thousands Group and Decimal character). These are to be specified (on MS Windows systems) in Windows registry; or, you may ALTER SESSION such as
SQL> alter session set nls_numeric_characters = ',.';

Session altered.

SQL> select to_char(12345.67, '999G990D00') from dual;

TO_CHAR(123
-----------
  12.345,67

SQL> alter session set nls_numeric_characters = '.,';

Session altered.

SQL> select to_char(12345.67, '999G990D00') from dual;

TO_CHAR(123
-----------
  12,345.67

SQL>
Re: THOUSANDSCHAR and DECIMALCHAR [message #386676 is a reply to message #386481] Mon, 16 February 2009 10:00 Go to previous messageGo to next message
khmba
Messages: 19
Registered: October 2006
Junior Member
How can I see nls_numeric_characters in session before change ?

Thank you

Re: THOUSANDSCHAR and DECIMALCHAR [message #386694 is a reply to message #386676] Mon, 16 February 2009 12:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Using the ALTER SESSION statement; it should be invoked by the FORMS_DDL built-in (probably in the WHEN-NEW-FORM-INSTANCE trigger).
Re: THOUSANDSCHAR and DECIMALCHAR [message #387035 is a reply to message #386694] Tue, 17 February 2009 12:13 Go to previous message
khmba
Messages: 19
Registered: October 2006
Junior Member
Thank you
I will try
Previous Topic: how to change Prompt Backgroud Color
Next Topic: form not running
Goto Forum:
  


Current Time: Thu Dec 08 20:09:39 CST 2016

Total time taken to generate the page: 0.24832 seconds