Question : SQL to strip characters from imported csv phone list

Hello,
I'm importing .csv phone lists into an Access database. My dialer only likes numerals so I need to strip the ( ) and - characters from the phone numbers in my table. (tblPhtemp).
I'm trying to use a SQL statement like the following:
But I get an Error No 13 Description: Type Mismatch
Code Snippet:
1:
2:
MySQL = "UPDATE tblPhtemp"
MySQL = MySQL + "Set tblPhtemp.Phone = Trim(Replace(Phone," - ",""))"

Answer : SQL to strip characters from imported csv phone list

You are missing a space before the Set and need two double quotes:

MySQL = "UPDATE tblPhtemp"
MySQL = MySQL + " Set tblPhtemp.Phone = Trim(Replace(Phone,"" -"",""""))"
Random Solutions  
 
programming4us programming4us