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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-15 : 09:56:28
|
| Neelesh writes "Hi Developers,I want to convert Number to word i.e. For eg. 25,000.00 as Twenty Five Thousand Five Hundred.Does any body know how to convert it ?" |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2002-03-15 : 15:31:27
|
quote: For eg. 25,000.00 as Twenty Five Thousand Five Hundred
Well, the first challenge is that the number and words in your example don't match. So this could be really tricky. Assuming that was just a typo... there's no built-in conversion in SQL Server to do this. You would probably be best to use a User-Defined Function (if you are in SQL 2000). Basically, this will involved analyzing each digit of the number one at a time and building the output string. You might search the forums and articles on this site, I think I've seen this topic come up before, or other places on the internet. I suspect that somebody has already created this UDF and it's available out there.------------------------GENERAL-ly speaking...Edited by - AjarnMark on 03/15/2002 15:32:45 |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
|
|
|
|
|