Conversion: Number to Character
Posted in 2000
Topics: General Discussion
Hi, I am having a serious problem. How can I convert number into character. I tried with to_char function but i.e. for converting into dates only. I have two columns samount money(14,2) famount money(14,2) Now I want to add this samount+famount and the result I want in character. smaount = 10 famount = 20 select (samount + famount) Dollars from table This should give me the result as: Thirty Will anybody helpme out this situation. Thanks Sarah ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
Sarah Jessica wrote: > Hi, > I am having a serious problem. How can I convert number into character. I > tried with to_char function but i.e. for converting into dates only. I have > two columns > samount money(14,2) > famount money(14,2) > Now I want to add this samount+famount and the result I want in character. > smaount = 10 > famount = 20 > select (samount + famount) Dollars > from table > > This should give me the result as: Thirty > > This would give you 30 and not "Thirty". To get Thirty you may have to write your own little program which would do the job. I have seen many written, there may also be a public one. You can also look on the http://www.iiug.org/software/software_index.html there maybe some. -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other RDBMS such as Oracle. Hydra 4GL Compiler (Compatible with I4GL) Compile once, run everywhere Phoenix Windows GUI. (Front End to 4GL) Chimera Java GUI The only GUI you will ever need... (Front End to 4GL) Arachne Web Technology (Front End to 4GL on the Web) For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------