SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to convert numeric to alphabets in mssql
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mohan123
Constraint Violating Yak Guru

India
252 Posts

Posted - 11/26/2012 :  04:42:10  Show Profile  Reply with Quote
Hello all,

i am facing small issue in my table i have values and i need to convert while i showing in grid for example i have value 1 and 2 and i need to convert them into ONE AND TWO how to convert is not about cast and convert????

P.V.P.MOhan

bandi
Flowing Fount of Yak Knowledge

India
2223 Posts

Posted - 11/26/2012 :  05:36:22  Show Profile  Reply with Quote
I think there is no direct in-built function for transforming numbers to words...

Anyway check this link to get UDF(User Defined Function)

http://gallery.technet.microsoft.com/scriptcenter/b2be3486-e3d2-4021-a9d8-8337ed428f64

--
Chandu
Go to Top of Page

revdnrdy
Posting Yak Master

USA
220 Posts

Posted - 11/27/2012 :  13:22:36  Show Profile  Reply with Quote
If you are just looking to transform the data why not just use a case statement?

SELECT ID, Category =
CASE Values
WHEN 'Value 1' THEN 'ONE'
WHEN 'Value 2' THEN 'TWO'
ELSE 'Not found'
END

FROM Sometable
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000