Jun 4, 2002 #1 jmlbones Technical User Jul 16, 2001 13 US I have phone numbers in a table as "(123) 456-7890" and I need to convert them to "123/456-7890" within a query. Can anyone help?
I have phone numbers in a table as "(123) 456-7890" and I need to convert them to "123/456-7890" within a query. Can anyone help?
Jun 4, 2002 #2 mikevh Programmer Apr 23, 2001 1,033 US Use the MID, RIGHT, LEN, and INSTR functions. Assuming the column with the phone number is called "phone": SELECT mid(phone, 2,3) & "/" & right(phone, len(phone) - instr(phone, " ") AS newphone FROM YourTable; Upvote 0 Downvote
Use the MID, RIGHT, LEN, and INSTR functions. Assuming the column with the phone number is called "phone": SELECT mid(phone, 2,3) & "/" & right(phone, len(phone) - instr(phone, " ") AS newphone FROM YourTable;