pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tony Capobianco <tcapobianco@prospectiv.com>
To: pgsql-sql@postgresql.org
Subject: Re: replace " with nothing
Date: Wed, 11 May 2011 16:51:05 -0400
Message-ID: <1305147065.1954.5.camel@tony1.localdomain> (raw)
In-Reply-To: <1305145780.1954.4.camel@tony1.localdomain>
References: <1305145780.1954.4.camel@tony1.localdomain>

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.
> 
> 





view thread (7+ messages)  latest in thread

Message-ID: <1305147065.1954.5.camel@tony1.localdomain>
Permalink:  ../1305147065.1954.5.camel@tony1.localdomain/
Also on:    postgresql.org/message-id/1305147065.1954.5.camel@tony1.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tcapobianco@prospectiv.com
  Subject: Re: replace " with nothing
  In-Reply-To: <1305147065.1954.5.camel@tony1.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox