Formatting data
Can someone please tell me how to format a phone number field to the following
(555)555-5555 123
the last part being the extention. Im using the datatype of varchar, is
this possible to format this field to look like a phone number field?
# 1 Re: Formatting data
Sheryl,
If the data is in SQL Server then you can use the following query :
1. Assuming that the column name is 'col1' of datatype varchar(13) and table
name is 'tbl_data'
2. Assuming that the data is like 5555555555123
update tbl_data set col1 = '('+substring(col1,1,3)+')'+substring(col1,4,3)+'-'+substring(col1,7,3)+'
'+substring(col1,11,3)
AKL.
"sheryl kemp" <dianedinero@aol.com> wrote:
>
>Can someone please tell me how to format a phone number field to the following
>
>(555)555-5555 123
>
>the last part being the extention. Im using the datatype of varchar, is
>this possible to format this field to look like a phone number field?