Change data arround

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

I have a table with phone number that were imported in the
following format (212)-555-0440. The field is set to text,
with no input masks.

I need to convert the numbers into a number field sothey
are stored as follows: 2125550440.

How would I formulate an Update query to do this
conversion?

Thanks
 
Base that field of your update query on an expression...

Expr1: Mid([ph#],2,3) & Mid([ph#],7,3) & Mid([ph#],11)
 
Providing that the () and - characters are always in the
same place, the SQL should be along the lines of
UPDATE YourTable SET yourNumberColumn =
Mid(yourTextColumn,2,3) & Mid(yourTextColumn, 7,3) &
Right(yourTextColumn,4)

Hope This Helps
Gerald Stanley MCSD
 
Back
Top