Converting Amount in integer to amount in words
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
Converting Amount in integer to amount in words
I have a requirement to Convert Amount in integer to amount in words
For eg: 1500 in source should get converted to Thousand Five Hundred in target
Any suggestions?
For eg: 1500 in source should get converted to Thousand Five Hundred in target
Any suggestions?
Last edited by abhilashnair on Mon Nov 19, 2012 2:57 am, edited 1 time in total.
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
An external routine might be able to ease your job. Not too sure about a tailor-made functionality in DataStage that wills erve your purpose
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
See if This helps. You can probably get a custom SQL at your source. This is under the assumption that your database is Oracle. Not too ure whether the SQLs mentioned will work with other DBs
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There's nothing built-in, but you can certainly create a routine. I recall creating a server routine to do just this thing many years back. Resolve certain questions first, such as whether commas and "and" are needed. For example "one thousand seven hundred twenty eight" or "one thousand, seven hundred and twenty eight". This routine is a useful example of recursion; you only need to write the function to handle up to a million; it can call itself to handle larger numbers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.