Re: Querying for strings that match after prefix

From: brian ally <brian(at)zijn-digital(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Querying for strings that match after prefix
Date: 2006-06-02 13:04:36
Message-ID: 44803764.4000802@zijn-digital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Sidney-Woollett wrote:
>>> I need to locate all the entries in a table that match , but only
>>> after a number of characters have been ignored. I have a table of
>>> email addresses, and someone else has erroneously entered some
>>> addresses prefixed with 'mailto:', which I'd like to ignore.
>
> Or something like
>
> select ltrim(substr(address, 8)) from people where address like
> 'mailto:%' union select address from people where address not like
> 'mailto:%'
>

Could you explain why the UNION?

brian

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2006-06-02 13:31:25 Re: A quick question on CONTRIB package
Previous Message badlydrawnbhoy 2006-06-02 12:18:08 Re: Querying for strings that match after prefix