473,379 Members | 1,216 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Change Number

I want to change number in word.
such as i write 1792400
it show seveteen lac ninty two thousand four hundred.


Jahid
Feb 11 '08 #1
2 1555
amitpatel66
2,367 Expert 2GB
I want to change number in word.
such as i write 1792400
it show seveteen lac ninty two thousand four hundred.


Jahid
Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT TO_CHAR(TO_DATE('1792400','J'),'JSP') FROM dual;
  3.  
  4.  
Feb 11 '08 #2
Expand|Select|Wrap|Line Numbers
  1.  
  2. CREATE OR REPLACE FUNCTION NUMBER_CONVERSION(NUM NUMBER) RETURN VARCHAR2
  3. IS
  4.   A VARCHAR2(1000);
  5.   B VARCHAR2(20);
  6.   X NUMBER;
  7.   Y NUMBER := 1;
  8.   Z NUMBER;
  9.   LSIGN NUMBER;
  10.   NO NUMBER;
  11. BEGIN
  12.   X:= INSTR(NUM, '.');
  13.   LSIGN := SIGN(NUM);
  14.   NO := ABS(NUM); 
  15.   IF X = 0 THEN 
  16.      SELECT  TO_CHAR(TO_DATE(NO, 'J'), 'JSP')  INTO A FROM DUAL;
  17.   ELSE
  18.      SELECT  to_char(to_date(SUBSTR(NO, 1,
  19.        NVL(INSTR(NO, '.')-1, LENGTH(NO))),
  20.         'J'), 'JSP') INTO A FROM DUAL;
  21.      SELECT LENGTH(SUBSTR(NO, INSTR(NO, '.')+1)) INTO Z FROM DUAL;
  22.      A := A ||' POINT ';
  23.      WHILE Y< Z+1 LOOP
  24.   SELECT TO_CHAR(TO_DATE(SUBSTR(NO, (INSTR(NO, '.')+Y), 1), 'J'), 'JSP')
  25.         INTO B FROM DUAL;
  26.   A := A || B ||' ';
  27.   y :=y+1;
  28.      END LOOP;
  29.   END IF;
  30.   IF LSIGN = -1 THEN
  31.      RETURN 'NEGATIVE '||A;
  32.   ELSE
  33.      RETURN A;
  34.   END IF;
  35. END;
  36.  

Select number_conversion(-3786.9899876) from dual;
Feb 12 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bryan R. Meyer | last post by:
I am a relatively new C++ programmer and am attempting to write a function that takes a number of type float and adds commas to it in the appropriate places. In order to manipulate the number to...
13
by: Jeff | last post by:
Hi! I'm trying to update a number in a document with the following code. It displays a number, a div block with a minus sign and a div block with a plus sign. When I click the plus sign I want...
2
by: Michael Hager | last post by:
Hello all, I have a client that has a database that produces certificates using an access report. The certificate has a picture of the person on it. The pictures were stored by SSN number, and...
7
by: Li Pang | last post by:
Hi I built an app of one .exe and several .dlls. I'd like to know how to force to change the version of dll everythime I rebuild the app Thank
0
by: GregS | last post by:
We have a client that has a very large number of users that will be connecting back to the domain via VPN only. The problem is that the communications vendor can not pass the password expiration...
13
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture'...
4
by: Orchid | last post by:
How can I change a Date datatype to a Number datatype? For example, I want a date 10/31/2006 to show 1031 as Number datatype. But I don't want it becomes 39021. What formula should I use? ...
10
by: jambonjamasb | last post by:
Hi all, I am new to this and am looking for some direction I have the ideas, but am having trouble putting it into practice. Any help would be greatly appreciated. I have set up three tables. ...
8
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've...
1
by: monkey1001 | last post by:
my program is suppose to show my due change and i got it working but my change and coins are wrong how can i improve it thank you..(its supposed to be in java)
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.