casting question

hook <hook@kcp.com>

From: "A. Van Hook" <hook@kcp.com>
To: pgsql-sql@postgresql.org
Date: 2002-02-02T15:20:38Z
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