even after laboriously following previous post, cannot cast from char to int

From: Lille Penguini <lille(dot)penguini(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: even after laboriously following previous post, cannot cast from char to int
Date: 2011-02-17 18:47:51
Message-ID: AANLkTi==PNNmuv2ax6cx-fGpuSLo7LTOYE0B2i6wwz-m@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey,

Re casting char columns to int, I've worked all the proposed solutions
from previous
post-gres mailing list
posts<http://archives.postgresql.org/pgsql-general/2010-02/msg01078.php>,
but to no avail.

None of the ALTER TABLE proposed fixes worked for me, and now I have a new
INTEGER type column created, I execute the following:

UPDATE zip_code_data SET county_fips_rev = CAST(county_fips as INTEGER);

...and this is what I get:

ERROR: invalid input syntax for type numeric: " "

What is this telling me?

Thanks,

Lille

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2011-02-17 19:32:09 Re: even after laboriously following previous post, cannot cast from char to int
Previous Message Andrej 2011-02-17 16:16:13 Re: regarding user creation