Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Wed, 17 Jun 2009 07:56:53 -0700
  • Message-id: <396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com> <text/plain>

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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group