Re: (none) - Mailing list pgsql-bugs

From Bruno Wolff III
Subject Re: (none)
Date
Msg-id 20031230162102.GB29408@wolff.to
Whole thread Raw
In response to (none)  (Sh A Guru Prasad <guru@ap.nic.in>)
List pgsql-bugs
On Tue, Dec 30, 2003 at 19:32:03 +0530,
  Sh A Guru Prasad <guru@ap.nic.in> wrote:
>
> Hi, How to convert number format (with decimal) into
> integer only ex:to conver 100.00 to 100.

Depending on what kind of rounding you want, you can just cast to
an integer. You could also use ceil, floor or round.

> One more
> Do we have any code to convert number to words
> ex: 1234 to one thousand two hundredn and thirty four.

I don't think there is currently a supplied function to do this. You
will need to write your own.

> (I want to use for indian currency only, i will use crores
> instead of billions)
>
> Thank you
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly

pgsql-bugs by date:

Previous
From: Sh A Guru Prasad
Date:
Subject: decimal to integer, number to words
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1038: Upon reload of data to install of v7.41 defaults for fields get screwed up