Home » Developer & Programmer » Forms » format mask (oracle reports 10g)
format mask [message #316817] Mon, 28 April 2008 07:56 Go to next message
rajesh4851
Messages: 89
Registered: January 2007
Member
Hi,
How to apply the format mask to give the output like the below:
Eg: data is like 1234567890, output should be 1234.567.890.
As per American standards we can use 'NNNNGNNNGNNN'. It will give output like 1234,567,890, but i want to give the output like 1234.567.890.
Please help me to solve this problem.

Regards,
Rajesh
Re: format mask [message #316957 is a reply to message #316817] Tue, 29 April 2008 00:01 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is about decimal and group characters; you'll have to ask your DBA to change this setting in order to display numbers the way you'd want it to.

For a session, no problem - you can do it yourself:
SQL> select to_char(1234567890, '9999G999G999') result from dual;

RESULT
-------------
 1234,567,890

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

Session altered.

SQL> select to_char(1234567890, '9999G999G999') result from dual;

RESULT
-------------
 1234.567.890

Or, you might do that by using the REPLACE function (so that you wouldn't have to ALTER anything):
SQL> select replace(to_char(1234567890, '9999G999G999'), ',', '.') result
  2  from dual;

RESULT
-------------
 1234.567.890

SQL>
This, however, can not be used in Format Mask property; you'd have to do that in, for example, POST-QUERY trigger.
Re: format mask [message #316999 is a reply to message #316957] Tue, 29 April 2008 01:58 Go to previous message
rajesh4851
Messages: 89
Registered: January 2007
Member
Thank you very much, it will help me a lot.
Previous Topic: How to stop lov from popping up when after giving blank spaces and typing correct values frm lov?
Next Topic: How to transfer values between forms?
Goto Forum:
  


Current Time: Sun Feb 09 05:13:29 CST 2025