Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A1BA11337BBA for ; Wed, 11 May 2011 17:51:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 03816-03 for ; Wed, 11 May 2011 20:51:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from stan.prospectivdirect.com (mail.prospectiv.com [155.212.59.212]) by mail.postgresql.org (Postfix) with SMTP id 473F4133798E for ; Wed, 11 May 2011 17:51:06 -0300 (ADT) Received: (qmail 2005 invoked from network); 11 May 2011 20:51:06 -0000 Received: from unknown (HELO ?192.168.1.87?) (192.168.1.87) by 0 with SMTP; 11 May 2011 20:51:06 -0000 Subject: Re: replace " with nothing From: Tony Capobianco To: pgsql-sql@postgresql.org In-Reply-To: <1305145780.1954.4.camel@tony1.localdomain> References: <1305145780.1954.4.camel@tony1.localdomain> Content-Type: text/plain; charset="UTF-8" Date: Wed, 11 May 2011 16:51:05 -0400 Message-ID: <1305147065.1954.5.camel@tony1.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-5 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/77 X-Sequence-Number: 35361 Ok, I think I found it: select translate(firstname,'"','') from members; gives me what I want. Thanks. On Wed, 2011-05-11 at 16:29 -0400, Tony Capobianco wrote: > We are converting from Oracle to Postgres. An Oracle script contains > this line: > > select replace(firstname,'"'), memberid, emailaddress from members; > > in an effort to replace the " with nothing. How can I achieve the same > result with Postgres? > > Here's the Postgres error I get: > > select replace(firstname,'"'), memberid, emailaddress from members; > ERROR: function replace(character varying, unknown) does not exist > LINE 1: select replace(firstname,'"'), memberid, emailaddress from m... > > Thanks. > >