Re: Remove Duplicate Words from a field

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Remove Duplicate Words from a field
Date: 2011-05-16 12:44:00
Message-ID: 4DD11C10.6030104@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16/05/2011 13:34, Sukuchha Shrestha wrote:
> Dear All,
>
> I am new to Postgresql. I have a field with lots of dublicate words and
> i want to remove any dublicate word from that field.
>
> For example, if i have a field with a string " one, one, two, two,
> three", how would i get " one, two, three" only ?

Maybe a regular expression, using regexp_replace()?

http://www.postgresql.org/docs/8.4/static/functions-string.html

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2011-05-16 12:54:17 Re: Remove Duplicate Words from a field
Previous Message Sukuchha Shrestha 2011-05-16 12:34:09 Remove Duplicate Words from a field