Skip to content

Commit 576add4

Browse files
committed
fixing other instances of wrong country format
1 parent 7545a41 commit 576add4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/unified-profiles/create-sql-traits.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & Oth
5656
SELECT
5757
c.*,
5858
CASE
59-
WHEN c.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND c.BILLING_COUNTRY = 'US'
59+
WHEN c.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND c.MAILING_COUNTRY = 'US'
6060
THEN CONCAT('+1', REGEXP_REPLACE(c.PHONE, '[^0-9]',''))
61-
WHEN c.BILLING_COUNTRY != 'US'
61+
WHEN c.MAILING_COUNTRY != 'US'
6262
THEN REGEXP_REPLACE(c.PHONE, '[^0-9]','')
6363
ELSE c.PHONE
6464
END as phone,
@@ -85,9 +85,9 @@ The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherP
8585
SELECT
8686
l.*,
8787
CASE
88-
WHEN l.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND l.BILLING_COUNTRY = 'US'
88+
WHEN l.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND l.COUNTRY = 'US'
8989
THEN CONCAT('+1', REGEXP_REPLACE(l.PHONE, '[^0-9]',''))
90-
WHEN l.BILLING_COUNTRY != 'US'
90+
WHEN l.COUNTRY != 'US'
9191
THEN REGEXP_REPLACE(l.PHONE, '[^0-9]','')
9292
ELSE l.PHONE
9393
END as phone,

0 commit comments

Comments
 (0)