Results 1 to 6 of 6

Thread: Number to words

  1. #1
    Join Date
    Jun 2004
    Posts
    19

    Exclamation Unanswered: Number to words

    hi

    I want to know how convert number to words or words to number

    for example. if i give input 100, i have to get the output "one hundred"

    is there any built in function available. need solution immediately.

    regards
    nlakka

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Run the attached script in PUBS database and see if that's what you want. I didn't have enough time to debug it, so if you find anything fishy, - just let me know.
    Attached Files Attached Files
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    OK, it has bugs, so hang on...
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Alright, now it's good to go (I think). A little roughy, but good enough for check generation and similar stuff.
    Attached Files Attached Files
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Apr 2006
    Posts
    1
    I have tried running the script but it should even translate the cents and not
    e.g. 50/100.

    Good luck

  6. #6
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by johngithui
    I have tried running the script but it should even translate the cents and not
    e.g. 50/100.

    Good luck
    Hey, Why don't you try this link ? Just make two part according to the position of the '.' decimal ,and add regional customization according to your choice.
    I will add that functionality very soon ...
    And use this logic to make it ...
    set @s='2344.34'
    set @part1=substring(@s,1,(len(@s)-3))
    set @part2=substring(@s,(len(@s)-1),2)
    and pass it to the function. Hope u will do that easily
    Last edited by rudra; 04-11-06 at 06:29.
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •