Try this query: UPDATE table SET phone = concat("(",left(phone,3),") ",mid(phone,3,3),"-",mid(phone,6,4)); It should convert 0000000000 to (000) 000-0000.
Take a look at this page if you want details on how it works: http://www.mysql.com/doc/S/t/String_functions.html - Jonathan -----Original Message----- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:23 AM To: '[EMAIL PROTECTED]' Subject: Changing data how would I change in all rows data that is; 0000000000 to 000-000-0000 or (000) 000-0000 Can this even be done with mysql? Thank you in advance... Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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