pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lew <noone@lewscanon.com>
To: pgsql-sql@postgresql.org
Subject: Re: replace " with nothing
Date: Wed, 11 May 2011 16:53:42 -0400
Message-ID: <iqet0i$fm0$1@news.albasani.net> (raw)
In-Reply-To: <1305145780.1954.4.camel@tony1.localdomain>
References: <1305145780.1954.4.camel@tony1.localdomain>

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

<http://www.postgresql.org/docs/9.0/interactive/functions-string.html;
<http://www.postgresql.org/docs/9.0/interactive/functions-string.html#FUNCTIONS-STRING-OTHER;

replace(string text, from text, to text)

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg



view thread (7+ messages)  latest in thread

Message-ID: <iqet0i$fm0$1@news.albasani.net>
Permalink:  ../iqet0i$fm0$1@news.albasani.net/
Also on:    postgresql.org/message-id/iqet0i$fm0$1@news.albasani.net

 · 

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: noone@lewscanon.com
  Subject: Re: replace " with nothing
  In-Reply-To: <iqet0i$fm0$1@news.albasani.net>

* 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