Hello folks Can anyone tell me an easy (1 SQL statement) to strip out non-alpha-numeric characters from a field please, using SQL in MYSQL (ver 3 or 4)
eg. 'this house' ----> this house <>-123 house ----> 123 house I want to keep spaces, alpha chars and numerics, but everything else needs to go. I've been trying to get my head round REGEXP, but can't find a way to use it in an UPDATE statement. Failing that I could populate a temporary table with the result of a SELECT, but my little head can't even seem to get that REGEXP working. I found the following solution using PHP, but I use ASP, VB etc. and would rather I could do the whole thing in SQL if possible, because the table has about 80,000 records: $out = ereg_replace("[^[:alpha:]]", "", $in); Does MYSQL support regular expressions in the REPLACE function? Thanks a lot for any help John. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php