casting question

From: "A(dot) Van Hook" <hook(at)kcp(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: casting question
Date: 2002-02-02 15:20:38
Message-ID: 3C5C03C6.CAE5CAB3@kcp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a column (quantityonhand | character(15) | default '' )
that I would like to use to perform simple math.
I can't seem to get the syntax for casting and have tried various
combinations of "select to_number(quantityonhand::text, '99G999D9S')".
Can not get get past ERROR: Bad numeric input format ' '.

Any help would be greatly appreciated....

tanks

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Boyle (Roselink) 2002-02-02 16:38:15 Re: test the existence of a database
Previous Message Tom Lane 2002-02-02 04:39:15 Re: Fractional Results