can't cast char to in

From: "blackwater dev" <blackwaterdev(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: can't cast char to in
Date: 2008-04-22 15:34:17
Message-ID: 34a9824e0804220834w4d0a7f45j994ac6b3194cf93f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with a mileage column that is a character varying (please
don't ask why :).

I need to do a query where mileage > 500

select * from cars where mileage>500

So I need to cast it but everything I try throws an error such as :

ERROR: invalid input syntax for integer: "+"

How can I cast this?

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2008-04-22 15:42:46 Re: can't cast char to in
Previous Message mateo21 2008-04-22 14:36:27 Bitmap Heap Scan takes a lot of time