Re: Re: select substr??? - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Re: select substr???
Date
Msg-id Pine.LNX.4.30.0104092037300.1255-100000@peter.localdomain
Whole thread Raw
In response to Re: select substr???  ("Tim Johnson" <tim@celestialdesign.co.uk>)
List 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@gmx.net       http://yi.org/peter-e/



pgsql-sql by date:

Previous
From: Richard
Date:
Subject: pg_dump and BLOB
Next
From: Wei Weng
Date:
Subject: Sorting and then...