Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Number to Text

Author  Topic 

daipayan
Posting Yak Master

181 Posts

Posted - 2010-02-25 : 11:23:19
Hello,

I want to know, how to write a query where number will be shown in words.

E.g. 1,24,378 should be shown as One Lakh Twenty Four Thousand Three Hundred Seventy Eight.

Daipayan

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-25 : 11:26:01
why do want to do this?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

daipayan
Posting Yak Master

181 Posts

Posted - 2010-02-25 : 11:44:40
Sir,

I have a report, where I am showing total of the sales value, now I want the total amount in text.

E.g.
Table: Product_rate
----------------
Product | Rate
----------------
Laptop | 42000
Pendrive| 2000
Mobile | 15000
----------------
TOTAL | 59000
----------------
Query:
select SUM(Rate) from Product_rate

The result will be shown as 59000 which I want to show as fifty nine thousand.


Hope I can make you understand my query!


quote:
Originally posted by visakh16

why do want to do this?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Daipayan
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-25 : 11:48:55
ok see this

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=11157

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

daipayan
Posting Yak Master

181 Posts

Posted - 2010-02-25 : 11:53:41
Thank You Sir..

quote:
Originally posted by visakh16

ok see this

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=11157

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Daipayan
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-25 : 11:56:18
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-01 : 01:05:31
quote:
Originally posted by daipayan

Sir,

I have a report, where I am showing total of the sales value, now I want the total amount in text.

E.g.
Table: Product_rate
----------------
Product | Rate
----------------
Laptop | 42000
Pendrive| 2000
Mobile | 15000
----------------
TOTAL | 59000
----------------
Query:
select SUM(Rate) from Product_rate

The result will be shown as 59000 which I want to show as fifty nine thousand.


Hope I can make you understand my query!


quote:
Originally posted by visakh16

why do want to do this?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Daipayan


Which report do you use?
Crystal Reports has a function called Towords which does what you want

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

daipayan
Posting Yak Master

181 Posts

Posted - 2010-03-01 : 10:00:44
I do not use any crystal report, I simply want a query..

Daipayan
Go to Top of Page
   

- Advertisement -