Re: Number Conversion Function - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Number Conversion Function
Date
Msg-id 20090406174847.GD4525@alvh.no-ip.org
Whole thread Raw
In response to Re: Number Conversion Function  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
Albe Laurenz wrote:
> Abdul Rehman wrote:
> > Can any body help me in converting numeric values into words
> > via postgres function: i.e. 313 to THREE HUNDRED THREE
>
> Here is a little PL/pgSQL function that should do what you
> want for numbers < 1000000000000.
> It should be easy to extend if you switch to bigint and decide
> if you want British or American English.

This is something that would be probably useful to have in
http://wiki.postgresql.org/wiki/Snippets
We have a function there to generate the numbers in spanish ...

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: "Chris Spotts"
Date:
Subject: Re: copy from with trigger
Next
From: Thomas Kellerer
Date:
Subject: Re: How to convert integer to boolean in insert