function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DritterDritter 

Marketing Cloud Phone Field Format Issue

We use Salesforce and the Marketing Cloud. In SF, we're using the standard phone field which is formatting numbers as such (XXX) XXX-XXXX. To use SMS in the MC, I have to reformat the phone as follows 1-XXX-XXX-XXXX when the student is from the United States. I'm using the follow CASE function in SQL, but can't save the query without getting an error.

CASE WHEN a.Phone LIKE ('(%') THEN ('1'+'-'+ SUBSTRING(a.Phone,2,3) +'-'+ SUBSTRING(a.Phone,7,3)+'-'+ SUBSTRING(a.Phone,11,4)) as Phone
END

I'm trying to determine if the phone starts with a parenthesis and then format it correctly if it's true. Any ideas? a.Phone comes from a Data Extension that has the Salesforce phone in it.
Marion DrevetMarion Drevet
what is the best format for sending SMS in the MC? International format number?
Baya AdamBaya Adam
Academic Master is a US based writing company that provides thousands of free essays to the students all over the World. If you want your essay written by a highly professional writers, then you are in a right place. We have hundreds of highly skilled writers working 24/7 to provide quality  essay writing services  to the students all over the World.
 
Baya AdamBaya Adam
My articles  is a writer’s community which provides you a guest posting service for your website no matter which niche does your your website belongs from.
You are warmly welcome to signup and share your stories to all over the world. Follow your favorite writers, create groups, forums, chat, and much much more!