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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.