Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g12Iwsl61219 for ; Sat, 2 Feb 2002 13:58:55 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id E54DCD600; Sat, 2 Feb 2002 10:58:54 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id DAF505BF8; Sat, 2 Feb 2002 10:58:54 -0800 (PST) Date: Sat, 2 Feb 2002 10:58:54 -0800 (PST) From: Stephan Szabo To: "A. Van Hook" Cc: Subject: Re: casting question In-Reply-To: <3C5C03C6.CAE5CAB3@kcp.com> Message-ID: <20020202105619.E42811-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200202/36 X-Sequence-Number: 6468 On Sat, 2 Feb 2002, A. Van Hook wrote: > > > 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.... You probably have a value in there which is not convertable to a numeric (such as the default '').