[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Changing data
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:vgill@xxxxxxxxxxxxxxxx]
Sent: Monday, December 03, 2001 3:23 AM
To: 'mysql@xxxxxxxxxxxxxxx'
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 <mysql-thread92886@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-JHilgeman=ecx.com@xxxxxxxxxxxxxxx>
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 <mysql-thread92907@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.