You need to sign in to do that
Don't have an account?
Dritter
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.
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.
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!