pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: A. Van Hook <hook@kcp.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: casting question
Date: Sat, 2 Feb 2002 10:58:54 -0800 (PST)
Message-ID: <20020202105619.E42811-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3C5C03C6.CAE5CAB3@kcp.com>

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 '').





view thread (3+ messages)  latest in thread

Message-ID: <20020202105619.E42811-100000@megazone23.bigpanda.com>
Permalink:  ../20020202105619.E42811-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020202105619.E42811-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, hook@kcp.com
  Subject: Re: casting question
  In-Reply-To: <20020202105619.E42811-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox