Site icon Hip-Hop Website Design and Development

Bulk create clear user_nicename from user_email with SQL operate

All user_nicenames have been changed with a website identify in botched import. I am attempting to recreate them from the user_email filed however want them cleaned of all particular characters ("@" and ".").

For instance, this e mail from the user_email column:

d.boone@wild.frontier

ought to be copied to the user_nicename column as:

d-boone-wild-frontier

Is that this one thing that may be finished in bulk with a MySQL question/operate? I’ve 5,000 customers to repair.