0

Can I reformat a phone number in SQL manager. I imported a foxpro dbf with the dts wizard and it imported the phone number as (609) 555-1212 I need it to be 6095551212

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by freshfitz
0

Can I reformat a phone number in SQL manager. I imported a foxpro dbf with the dts wizard and it imported the phone number as (609) 555-1212 I need it to be 6095551212

Try Nested REPLACE Functions
------------------------------

SELECT  REPLACE(REPLACE(REPLACE(REPLACE('(800) 555-1212', '(', ''), ')', ''), ' ', ''), '-', '')

------------------------------
copy and paste this and change the literal phone number to your field name or variable.

0

i DID find a stored procedure that worked but thanks, I keep this with my pile of scripts

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.