This is a discussion on "Query to display salary in words" within the Databases section. This forum, and the thread "Query to display salary in words are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Query to display salary in words
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Query to display salary in words
Hi all,
I need to write a query which fetch the salary of employee and displays it. select emp_id,salary from emp_details Result: emp_id salary 1 5000 2 6000 Now i want the salary to be displayed like this. For eg. Five thousand hundred instead of 5000 i know that it can be done in oracle. is it possible to do this in Mysql? Thanks, Thanuja. |
|
|
|
|||
|
Re: Query to display salary in words
I think that Oracle's to_char may be unique - it's certainly unusual and it's a classic "interview question" for Oracle dba-s - see here.
You can do it at the program level once you have the number extracted easily enough - again it's not built in but code is available in many languages. See PHP solution Java Solution Perl solution |
|
|||
|
Re: Query to display salary in words
Thanks grahme. so Mysql does not have any function to do this right?
Regards, Thanuja. |
|
|||
|
Re: Query to display salary in words
Here is a PHP function class that will do that - maybe you can use it even tho it's not a built-in MySQL function.
http://articles.techrepublic.com.com...1-5193528.html RalphF GoldRushWebHosting.com Last edited by karinne; Jun 22nd, 2007 at 12:09. Reason: No advertising please! Read the sig rules! |
![]() |
| Tags |
| words |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regardind see-saw moment of words | pushpendramadan | Website Planning | 5 | Jan 7th, 2008 04:48 |
| Help with key words | Wombat | Starting Out | 4 | Jul 17th, 2007 08:10 |
| Gre words and vocabulary builder | hawashp | Free Web Site Critique | 7 | May 25th, 2007 08:33 |
| Weird IE Bug - repeating words | Andy K | Web Page Design | 5 | Mar 5th, 2006 12:23 |
| write words on pictures | jenjen1018 | Web Page Design | 10 | Dec 19th, 2003 18:17 |