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