Re: numbers as words

From: Nigel Noble <nigel_at_churchill.co.uk>
Date: Fri, 30 Sep 1994 09:22:14 GMT
Message-ID: <CwxrD3.In0_at_churchill.co.uk>


Just an idea, but under 7.1 you can write your own SQL functions in PL/SQL. As far as I know, it's handeled by the backend so it should not matter from where you call the function. Eg,
select NUMTEXT(1234) from dual;

You can then write a stored database function called NUMTEXT.

John Bartley (john_at_wpa.com) wrote:
: I'm looking for some SQL coding techniques or at least a reasonable
: conceptual approach to printing check amounts as words, e.g., the check
: amount is printed in numbers as $9,999.99 and printed on the next line as
: Nine Thousand Nine Hundred Ninety-nine and 99/100.
 

: Hopefully I'm not being too dense in asking about this - I have done it
: years ago in BASIC and COBOL, but not recently, and not using SQL. I'm
: sure others have done this zillions of times, but it seems to follow
: Bartley's Pigeon Law - "everybody knows baby pigeons must exist, but
: nobody has ever seen one." :-) (No offense to any pigeon lovers out
: there.)
 

: Seriously, it seems like there should be a relatively simple and elegant
: approach to doing this but all I can come up with are tedious hacks. I
: need something "generic" using only SQL and not resorting to PL/SQL (I
: need it to work under Oracle and Gupta.) Could someone who has solved this
: problem before point me in the right direction? Thanks for the help.

--
                                  _____________
    Nigel Noble                       churchill        Tel: +44 81 313 5677
    Database Administrator        =============        Fax: +44 81 313 5699
    Churchill Technology Ltd
    15-17 London Rd, Bromley BR1 1DE, UK.    Email: nigel_at_churchill.co.uk
Received on Fri Sep 30 1994 - 10:22:14 CET

Original text of this message