Received: from snoopy.os.kcp.com (snoopy.os.kcp.com [198.124.201.8]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g12FKpl28964 for ; Sat, 2 Feb 2002 10:20:51 -0500 (EST) (envelope-from hook@kcp.com) Received: from kcpgw4.kcp.com (kcpgw4 [198.62.69.74]) by snoopy.os.kcp.com (8.11.6/8.11.3) with SMTP id g12FKiq05893 for ; Sat, 2 Feb 2002 09:20:44 -0600 (CST) Received: from bagman.kcp.com by kcpgw4.kcp.com via smtpd (for [198.124.201.8]) with SMTP; 2 Feb 2002 15:20:44 UT Received: from mailhub.kcp.com (unverified) by bagman.kcp.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Sat, 2 Feb 2002 09:21:42 -0600 Received: from kcp.com (gater.kcp.com [147.101.12.8]) by mailhub.kcp.com (8.11.4/8.11.6) with ESMTP id g12FKcn14698 for ; Sat, 2 Feb 2002 09:20:38 -0600 (CST) Message-ID: <3C5C03C6.CAE5CAB3@kcp.com> Date: Sat, 02 Feb 2002 09:20:38 -0600 From: "A. Van Hook" Organization: Honeywell X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: casting question Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Archive-Number: 200202/34 X-Sequence-Number: 6466 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