Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 11 total |
More in hope than expectation. |
Thu, May 26 2011 12:44 PM | Permanent Link |
Adam Brett Orixa Systems | OK: I need a function which converts number to wordsdescribing numbers i.e.
SELECT MyNumber, NumberToWords(MyNumber) FROM My table would return 1,234, One thousand two hundred and thirty four. 25,000, Twenty five thousand. 12,598 Twelve thousand five hundred and ninety eight ... ouch. I need it for legal documents where the user has to sign having seen both the number written as a number and written as long-hand-text ... Of course I can force staff to type in the text versions long hand ... but a FUNCTION would be genius. -- I don't really expect ELEVATE to have such a function ever (Tim??!!) but has anyone ever found something that does this, perhaps a specialised Delphi accounting / legal component? |
Thu, May 26 2011 12:45 PM | Permanent Link |
Adam Brett Orixa Systems | Oh: And wait for it ... I need to work in English AND French (:-?
|
Thu, May 26 2011 1:25 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
You can either choose to do something like this in SQL/PSM or in Delphi. If you choose the latter then you can search on www.torry.net for conversion routines (eg Branko's Conversion Components v.1.0) You'll probably have to add the French bits yourself though. Roy Lambert |
Fri, May 27 2011 8:17 AM | Permanent Link |
Adam Brett Orixa Systems | Brilliant Roy! The code you recommended is decent & freeware. Written in Serbian-pascal, which is a bit of a complication. I'll solve the problem in Delphi for now.
Adding French will take a while, as their number system is really messy. (for example, they say "ninety five" "four twenties fifteen") ... Guess it _could_ be written as a SQL function ... I'd hate to have to try it though! |
Mon, May 30 2011 8:24 AM | Permanent Link |
John Hay | Adam
> Adding French will take a while, as their number system is really messy. (for example, they say "ninety five" "four twenties fifteen") > Definitely is more compicated than English! > .. Guess it _could_ be written as a SQL function ... I'd hate to have to try it though! Find attached an attempt at it. I used http://www.french-linguistics.co.uk/tutorials/numbers as my reference for the French. Apologies for the formatting. It is only good up to 999,999,999.99. You call valueinwords(currency) for english and frvalueinwords(currency) for French. I guess the currency names could be parameters John Attachments: NUMBERS.txt |
Mon, May 30 2011 8:57 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
When I looked at it I first spotted cents and thought "why is he assuming $" Roy Lambert |
Mon, May 30 2011 9:08 AM | Permanent Link |
John Hay | Roy
> > > When I looked at it I first spotted cents and thought "why is he assuming $" > It's our new currency post independence John |
Mon, May 30 2011 12:12 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
>> > When I looked at it I first spotted cents and thought "why is he assuming $" >> > >It's our new currency post independence Nope - our new currency is called "where has all the money gone" Roy Lambert |
Tue, May 31 2011 4:14 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< .. Guess it _could_ be written as a SQL function ... I'd hate to have to try it though! >> It's very easy to pop such Delphi code into an external module for EDB: In Delphi, use: File/New/Other/ElevateDB/ElevateDB External Module and then just put the code into the procedure TEDBExternalModule1.EDBExternalModuleRoutine with something like this: if AnsiSameText(RoutineName,'NumberToWords') then begin { Put code here } end; The external modules work just like the custom functions do in DBISAM - ParamByName(), etc. for dealing with the parameters, and a special "Result" parameter for returning results of function calls. Once you have the external module compiled, you can add it to EDB with CREATE MODULE, and then reference it as a function via CREATE FUNCTION...EXTERNAL -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 1 2011 8:02 AM | Permanent Link |
Adam Brett Orixa Systems | WOW!!
Boy do I have a lot to learn about EDB. |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |