MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Victoria Reznichenko Date:July 24 2003 6:12pm
Subject:Re: select part of a field into another field
View as plain text  
Jason Joines <joines@stripped> wrote:
>  I have a table with an email field that contains values of the form 
> uid@domain.  I need to populate a new field called uid with just the uid 
> part of the email address.  Is there any way of using select to just 
> retrieve the part before the @ and insert it into the uid field?

Use SUBSTRING_INDEX() function:
	http://www.mysql.com/doc/en/String_functions.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   Victoria.Reznichenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




Thread
select part of a field into another fieldJason Joines24 Jul
  • RE: select part of a field into another fieldDathan Vance Pattishall24 Jul
    • Function to extract difference in Minutes from DateTime variablesC.F. Scheidecker Antunes24 Jul
      • RE: Function to extract difference in Minutes from DateTime variablesDathan Vance Pattishall24 Jul
  • Re: select part of a field into another fieldMysql List24 Jul
  • Re: select part of a field into another fieldVictoria Reznichenko24 Jul
RE: select part of a field into another fieldJonathan Patton24 Jul
  • Re: select part of a field into another fieldJason Joines24 Jul
Re: Function to extract difference in Minutes from DateTime variablesInfo26 Jul
RE: Function to extract difference in Minutes from DateTime variablesInfo26 Jul
Re: select part of a field into another fieldInfo26 Jul
Re: select part of a field into another fieldInfo26 Jul