Re: Invalid input for numeric problem

From: Richard Huxton <dev(at)archonet(dot)com>
To: mike <mike(at)redtux1(dot)uklinux(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Invalid input for numeric problem
Date: 2005-01-14 15:53:52
Message-ID: 41E7EB10.1060207@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

mike wrote:
> WHEN to_number(vw_expend.code::text, '999'::text) <
> 50::numeric THEN '2'::text

> When I do for example
>
> SELECT * FROM vw_budget WHERE period = '1';
>
> I get the following error
>
> ERROR: invalid input syntax for type numeric: " "

Probably vw_expend.code contains a space in one or more rows, and
to_number() is failing the conversion.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2005-01-14 16:11:43 Re: Problem running native windows Postgres 8 pg_dump etc on
Previous Message laurie.burrow 2005-01-14 15:42:05 Re: Problem running native windows Postgres 8 pg_dump etc on