gerald_clark wrote:
update employees set userid=substring(.....

Jason Joines wrote:

I have a table called employees on a 3.23.48 server. One of it's fields is an email address (email) and one is the userid. The primary key is idnumber. I need to populate the userid field from the email address field. I can get the userid using:

SELECT substring(per_email_address,1,instr(per_email_address,'@')-1) from employees;

but I haven't been able to get the results into the userid field.

Any ideas?

Thanks,

Jason
===========


Thank you.

UPDATE employees SET userid=substring(email,1,instr(email,'@')-1);

is exactly what I needed.

Jason
===========



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to