Re: Re: select substr???

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tim Johnson <tim(at)celestialdesign(dot)co(dot)uk>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Re: select substr???
Date: 2001-04-09 18:38:50
Message-ID: Pine.LNX.4.30.0104092037300.1255-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tim Johnson writes:

> Hi,
>
> I have postgres 6.x (where x is something).
>
> I have the following list of data
>
> data
> --------
> ABC*
> ABC
> ABC-
> ABC+
> ABC
> QWE~
> ASD+
> ASD#
> KLASDHK-
> KLASDHK+
> KLASDHK
> KLASDHK*
>
>
> what I want to do is 'select distinct(data) [ignoring non alphanumeric
> characters] order by data'

Write a function that strips off the suffixes and do 'select distinct
voodoo(data) ...'.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Wei Weng 2001-04-09 23:22:52 Sorting and then...
Previous Message Tim Johnson 2001-04-09 17:05:55 Re: select substr???