Re: How to cast as numeric

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Savita <savita(at)india(dot)hp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to cast as numeric
Date: 2002-11-06 18:04:06
Message-ID: 20021106180406.GB14903@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 06, 2002 at 18:21:08 +0530,
Savita <savita(at)india(dot)hp(dot)com> wrote:
> Hi ,
>
> I would like to know how to cast as numeric.For examlple
>
> I can use cast as
>
> cast(to_number(substring(os_crm_exchange_call_id, 4), 999999999999) as
> smallint)

::numeric

numeric has 2 option paramters that allow you to limit the precision
and specify a scale. The default is to not limit precision.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2002-11-06 18:49:07 Re: Synchronising/mirroring databases
Previous Message Bruno Wolff III 2002-11-06 18:01:40 Re: Formatting psql output