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

Re: replace " with nothing

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: replace " with nothing
Date: 2011-05-11 20:53:42
Message-ID: iqet0i$fm0$1@news.albasani.net (view raw or flat)
Thread:
Lists: pgsql-sql
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

In response to

pgsql-sql by date

Next:From: Leif Biberg KristensenDate: 2011-05-11 21:11:07
Subject: Re: replace " with nothing
Previous:From: Tony CapobiancoDate: 2011-05-11 20:51:05
Subject: Re: replace " with nothing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group