Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 437F962FBE6 for ; Wed, 17 Jun 2009 11:57:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 77501-02-4 for ; Wed, 17 Jun 2009 11:57:38 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mail.postgresql.org (Postfix) with ESMTP id 87B716357C5 for ; Wed, 17 Jun 2009 11:57:00 -0300 (ADT) Received: by qw-out-2122.google.com with SMTP id 8so175461qwh.61 for ; Wed, 17 Jun 2009 07:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3On8kA0XSmeMmMAaG+OQgwQqsW4MvY4nFMvQv4qfrlA=; b=MxVJxSvmsbaM1n4Ycr4teo/ySUZ2xkYr0pA1NSEPfQQ/DxYA96/PQ1vPNjQgg8Q0uN leAMLRvsrABSGy7D9N7y7Ftaylt9B7M2I9nh9DGhBsZ0Wz9ZJ7yy8adTUsSFKJs86lOo DnPdJph45F67QTBiAKI9AuFYLaFX0j+1PVSVQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=c6541FtA/JOzRW0E2RiwGhZ0tQ+ziXSiNQ52WM6LqedjHI9MdhO0EOcPVmPmHP1S58 Vbaf6OzgaM+AeiUWxcRZlj4/KgjUeTEqfS2rV10fXfYTY8C0IYdzWnUqypt8HnTn8uqZ /XxA2AuZWloduhfbegG+CeCzS0yTBwZ3MNLq8= MIME-Version: 1.0 Received: by 10.220.77.17 with SMTP id e17mr287094vck.47.1245250613840; Wed, 17 Jun 2009 07:56:53 -0700 (PDT) In-Reply-To: <14af40510906170635w7c793ef0p3f36b13fc9958cdb@mail.gmail.com> References: <14af40510906170635w7c793ef0p3f36b13fc9958cdb@mail.gmail.com> Date: Wed, 17 Jun 2009 07:56:53 -0700 Message-ID: <396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com> Subject: Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer From: Richard Broersma To: Ashish Jain Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.079 tagged_above=0 required=5 tests=AWL=0.079 X-Spam-Level: X-Archive-Number: 200906/65 X-Sequence-Number: 19729 On Wed, Jun 17, 2009 at 6:35 AM, Ashish Jain 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