| From: | Darren Ferguson <darren(at)crystalballinc(dot)com> |
|---|---|
| To: | Mark Wilson <mark(at)mediasculpt(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: replace text function |
| Date: | 2002-11-06 23:08:49 |
| Message-ID: | Pine.LNX.4.44.0211061806050.8014-100000@thread.crystalballinc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
There is a function called TRANSLATE
This will do the trick
HTH
On Thu, 7 Nov 2002, Mark Wilson wrote:
> Hi all,
>
> I'm trying to find a function that will replace one word with another in a
> string.
>
> e.g. select <replace function>('bob was here, bobina wasnt', 'bob', 'mike');
> will return "mike was here, mikeina wasnt"
>
> Is there such a function already written in PostGreSQL?
>
> Thanks in advance,
> Mark
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
Darren Ferguson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Bartley | 2002-11-07 02:29:42 | bit strings |
| Previous Message | Joe Conway | 2002-11-06 22:51:25 | Re: replace text function |