Re: [GENERAL] Querying for strings that match after prefix

2006-06-03 Thread badlydrawnbhoy
Hi there, I think I need to explain a bit further. I tried simply using update people replace(address, 'mailto:',''); but unfortunately that produced a duplicate key error as some of the addresses prefixed with 'mailto:' are already present (unprefixed) in the table. So what I need to do is

Re: [GENERAL] Querying for strings that match after prefix

2006-06-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-06-02 05:18:08 -0700: I think I need to explain a bit further. I tried simply using update people replace(address, 'mailto:',''); but unfortunately that produced a duplicate key error as some of the addresses prefixed with 'mailto:' are already present

[GENERAL] Querying for strings that match after prefix

2006-06-02 Thread badlydrawnbhoy
Hi all, I hope this is the right forum for this, but please correct me if somewhere else is more appropriate. 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

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread Joachim Wieland
On Fri, Jun 02, 2006 at 02:47:22AM -0700, badlydrawnbhoy 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:',

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread John Sidney-Woollett
Do you mean? select replace(address, 'mailto:', '') from people ... and if you only want to find the ones that start with mailto:; select replace(address, 'mailto:', '') from people where address like 'mailto:%' John badlydrawnbhoy wrote: Hi all, I hope this is the right forum for this,

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread John Sidney-Woollett
Or something like select ltrim(substr(address, 8)) from people where address like 'mailto:%' union select address from people where address not like 'mailto:%' John John Sidney-Woollett wrote: Do you mean? select replace(address, 'mailto:', '') from people ... and if you only want to find

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread brian ally
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

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread John Sidney-Woollett
1) select ltrim(substr(address, 8)) from people where address like 'mailto:%' gives all addresses that start with mailto:; but first strips off the prefix leaving only the email address 2) select address from people where address not like 'mailto:%' produces all email address that don't need

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread brian ally
John Sidney-Woollett wrote: brian ally wrote: 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

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread Joseph Brenner
badlydrawnbhoy [EMAIL PROTECTED] wrote: I hope this is the right forum for this, but please correct me if somewhere else is more appropriate. 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