Re: Invalid input for numeric problem - Mailing list pgsql-general

From Richard Huxton
Subject Re: Invalid input for numeric problem
Date
Msg-id 41E7EB10.1060207@archonet.com
Whole thread Raw
In response to Invalid input for numeric problem  (mike <mike@redtux1.uklinux.net>)
List 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

pgsql-general by date:

Previous
From: laurie.burrow@powerconv.alstom.com
Date:
Subject: Re: Problem running native windows Postgres 8 pg_dump etc on
Next
From: "Magnus Hagander"
Date:
Subject: Re: Problem running native windows Postgres 8 pg_dump etc on