From: | "Moiz Kothari" <moizpostgres(at)gmail(dot)com> |
---|---|
To: | "Yogesh Arora" <yogesh(dot)arora(dot)daffodil(at)gmail(dot)com> |
Cc: | "Bruce Momjian" <bruce(at)momjian(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Number to Words Conversion |
Date: | 2007-11-02 08:48:01 |
Message-ID: | 82e1a9bd0711020148w9f0edfaw6f0e4112b9ed9243@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
So how would it look like if you say "1520.50" what should it return you
back?
Regards,
Moiz Kothari
On 11/2/07, Yogesh Arora <yogesh(dot)arora(dot)daffodil(at)gmail(dot)com> wrote:
>
> Hi,
>
> As i am Working for Decimal Formats..... is there any method to do it
> in the same way.
>
>
> On 11/2/07, Moiz Kothari < moizpostgres(at)gmail(dot)com> wrote:
> >
> > Hi,
> >
> > You can use what bruce has suggested and get the value you want.
> >
> > eg.
> >
> > select trim(substring(cash_words('1520'), 1, position('dollars' in
> > cash_words('1520'))-1));
> >
> > will return you
> >
> > One thousand five hundred twenty (But ofcourse this eg. does not work
> > for decimals)
> >
> > Regards,
> > Moiz Kothari
> >
> > On 11/2/07, Bruce Momjian < bruce(at)momjian(dot)us> wrote:
> >
> > > yogesh wrote:
> > > > Hello Frnds,
> > > >
> > > > Is there any way to Convert the Number to its equivalent String
> > > > ( Words)
> > > >
> > > > e.g. 10 to TEN. Urgent require the Answer..
> > >
> > > We have cash_words:
> > >
> > > test=> SELECT cash_words('100');
> > > cash_words
> > > ------------------------------------
> > > One hundred dollars and zero cents
> > > (1 row)
> > >
> > > but that is money-oriented.
> > >
> > > --
> > > Bruce Momjian < bruce(at)momjian(dot)us> http://momjian.us
> > > EnterpriseDB
> > > http://postgres.enterprisedb.com
> > >
> > > + If your life is a hard drive, Christ can be your backup. +
> > >
> > > ---------------------------(end of
> > > broadcast)---------------------------
> > > TIP 5: don't forget to increase your free space map settings
> > >
> >
> >
> >
> > --
> > Hobby Site : http://dailyhealthtips.blogspot.com
>
>
>
>
> --
> Best Regards,
> Yogesh Arora
>
>
--
Hobby Site : http://dailyhealthtips.blogspot.com
From | Date | Subject | |
---|---|---|---|
Next Message | Christian Rengstl | 2007-11-02 09:04:06 | Questions concerning check constraints |
Previous Message | carter ck | 2007-11-02 08:33:29 | Re: Improve Search |