Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer - Mailing list pgsql-jdbc

From Richard Broersma
Subject Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
Date
Msg-id 396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com
Whole thread Raw
In response to org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer  (Ashish Jain <ashjain2@gmail.com>)
Responses Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
List pgsql-jdbc
On Wed, Jun 17, 2009 at 6:35 AM, Ashish Jain<ashjain2@gmail.com> wrote:

> Can any one help me to write a cast statement which automatically cast
> integer to character??

The SQL standard way would be:  CAST( your_int_column AS TEXT )
or the Postgresql way:  your_int_column::TEXT


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-jdbc by date:

Previous
From: Ashish Jain
Date:
Subject: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
Next
From: Ashish Jain
Date:
Subject: Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer