| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
| Cc: | Abdul Rehman *EXTERN* <abr_ora(at)yahoo(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Number Conversion Function |
| Date: | 2009-04-06 17:48:47 |
| Message-ID: | 20090406174847.GD4525@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Kellerer | 2009-04-06 17:51:15 | Re: How to convert integer to boolean in insert |
| Previous Message | Chris Spotts | 2009-04-06 17:44:12 | Re: copy from with trigger |