Hi,

What you perhaps could use is the REGEXP usage in your where clause.
Try this:
update name set first_name=replace(first_name, '\\', '') where first_name regexp '\\\\';

The fun thing is that when you put '\\' instead of the '\\\\' after the regexp function it doesn't work. But this sure does.

Before you use the update, create a selection first with the regexp function; if that works, your update will do fine.

Hope this little info helps you :-)

Danny

Jerry Swanson wrote:
I have 290 records in the database with backslashes. I want to remove the
backslashes.  Why the query below doesn't remove backslashes?

update name set first_name = REPLACE(first_name,'\\\\','') where first_name
like '%\\\\%';


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

Reply via email to