Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > can't cast char...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 15353 of 17602
Post > Topic >>

can't cast char to in

by blackwaterdev@[EMAIL PROTECTED] ("blackwater dev") Apr 22, 2008 at 11:34 AM

------=_Part_8865_30702476.1208878457774
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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!

------=_Part_8865_30702476.1208878457774
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I have a table with a mileage column that is a character varying (please
don&#39;t ask why :).<br><br>I need to do a query where mileage &gt;
500<br><br>select * from cars where mileage&gt;500<br><br>So I need to
cast it but everything I try throws an error such as :<br>
<br><pre class="data">ERROR:  invalid input syntax for integer:
&quot;+&quot;<br><br>How can I cast
this?<br><br><br><br>Thanks!<br></pre><br>

------=_Part_8865_30702476.1208878457774--
 




 4 Posts in Topic:
can't cast char to in
blackwaterdev@[EMAIL PROT  2008-04-22 11:34:17 
Re: can't cast char to in
erik@[EMAIL PROTECTED] (  2008-04-22 10:42:46 
Re: can't cast char to in
blackwaterdev@[EMAIL PROT  2008-04-22 11:47:08 
Re: can't cast char to in
dev@[EMAIL PROTECTED] (R  2008-04-22 18:09:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:18:47 CST 2008.