Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Ashish Jain <ashjain2(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
Date: 2009-06-17 14:56:53
Message-ID: 396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, Jun 17, 2009 at 6:35 AM, Ashish Jain<ashjain2(at)gmail(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ashish Jain 2009-06-17 19:10:11 Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
Previous Message Ashish Jain 2009-06-17 13:35:26 org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer