Re: how to extract common text string from field?

2006-05-12 Thread Dan Nelson
In the last episode (May 12), Ferindo Middleton said: > Suppose you have a field in a db table that holds email addresses and all of > the address end in domain.com. Is there a MySQL function that can be used to > extract the first part of the email address, the username (the part of the > email ad

RE: how to extract common text string from field?

2006-05-12 Thread Robert DiFalco
Why not store them in separate columns? You could then have the domain field be a foreign key into another table. -Original Message- From: Ferindo Middleton [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 2:14 PM To: mysql@lists.mysql.com Subject: how to extract common text string

Re: how to extract common text string from field?

2006-05-12 Thread Eduardo Galván
Check the string functions SUBSTRING and LOCATE. As a hint look for the position of '@'. Ferindo Middleton escribió: Suppose you have a field in a db table that holds email addresses and all of the address end in domain.com. Is there a MySQL function that can be used to extract the first part

how to extract common text string from field?

2006-05-12 Thread Ferindo Middleton
Suppose you have a field in a db table that holds email addresses and all of the address end in domain.com. Is there a MySQL function that can be used to extract the first part of the email address, the username (the part of the email address before the 'domain.com' part of the email address). I