Home » Developer & Programmer » Reports & Discoverer » Masking number to word (Oracle 10.2.0.1.0,,Report Builder 10.1.2.0.2)
Masking number to word [message #585079] Tue, 21 May 2013 17:51 Go to next message
jay_cooldude
Messages: 50
Registered: March 2013
Location: Hyd
Member
Hi,

I just want to know whether we can mask salary column of number datatype into text,like we used to_char(to_date(<column_name>,'j'),'jsp') in sql?
for example
Name    Salary
SMITH    800

to 
Name         Salary
SMITH     EIGHT HUNDRED


Thanks In Advance.

Regards,
Jay
Re: Masking number to word [message #585094 is a reply to message #585079] Wed, 22 May 2013 00:51 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, exactly the way you posted in your message (i.e. spell the Julian date).
SQL> select ename,
  2         sal,
  3         to_char(to_date(sal,'j'),'jsp') words
  4  from emp
  5  where deptno = 20;

ENAME             SAL WORDS
---------- ---------- -----------------------------------------------
SMITH            1600 one thousand six hundred
JONES            3775 three thousand seven hundred seventy-five
SCOTT            3800 three thousand eight hundred
ADAMS            1900 one thousand nine hundred
FORD             3800 three thousand eight hundred

SQL>
Re: Masking number to word [message #585097 is a reply to message #585094] Wed, 22 May 2013 01:39 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
for more info.
Select to_char(to_date(5373484,'j'),'jsp') words from dual;
five million three hundred seventy-three thousand four hundred eighty-four

Julian date must be between 1 and 5373484.

Regards,
Irfan
Re: Masking number to word [message #585098 is a reply to message #585097] Wed, 22 May 2013 01:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I wish my salary will exceed this value. Smile

Regards
Michel
Re: Masking number to word [message #585185 is a reply to message #585094] Wed, 22 May 2013 15:32 Go to previous messageGo to next message
jay_cooldude
Messages: 50
Registered: March 2013
Location: Hyd
Member
Hi sir,
i appreciate your work . But the point is i want to know is that without using the query can i get the desired results
for example

mask field in property inspector
or
srw.format_mask();
etc.

Thanks in advance.

Regards,
Jay.
Re: Masking number to word [message #585189 is a reply to message #585185] Wed, 22 May 2013 15:39 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Can you? As far as I can tell, you can't. If you ever find out the opposite, let us know!
Previous Topic: SRW
Next Topic: Report 11g and Bullet List
Goto Forum:
  


Current Time: Fri Mar 29 08:19:41 CDT 2024