选择
当 [MOBILE/PHONE] 像 '[a-z]%' 然后为 null 否则 [MOBILE/PHONE] 以 [MOBILE/PHONE] 结尾时,
ISNUMERIC(email)=0 然后 EMAIL 以 EMAIL 结尾的情况
从
(
选择
REPLACE(SUBSTRING(RIGHT(right(left(AC.Communication,charindex('}',AC.Communication)),len(left(AC.Communication,charindex('}',AC.Communication))) - charindex(' :',left(AC.Communication,charindex('}',AC.Communication)))),LEN(right(left(AC.Communication,charindex('}',AC.Communication)),len(left(AC .Communication,charindex('}',AC.Communication))) - charindex(':',left(AC.Communication,charindex('}',AC.Communication)))))-CHARINDEX(':',right (left(AC.Communication,charindex('}',AC.Communication)),len(left(AC.Communication,charindex('}',AC.Communication))) - charindex(':',left(AC.Communication) Communication,charindex('}',AC.Communication)))))),2,CHARINDEX(']',AC.Communication)),'"}','') AS [手机/电话],
替换(替换(左(右(AC.Communication,charindex(':',reverse(AC.Communication))),LEN(右(AC.Communication,charindex(':',reverse(AC.Communication))))) -charindex('}',reverse(right(AC.Communication,charindex(':',reverse(AC.Communication)))))),':"',''),'"','') AS电子邮件
来自 DimAccountContact 作为 AC