Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

handling phone number data in SSIS

$
0
0

Hello,

I'm trying to use conditional split to take out the numbers that are not formatted correctly, here is the expression that I have

LEN([Home Phone]) == 10 ? (DT_STR,12,1252)SUBSTRING([Home Phone],1,3) + "-" + SUBSTRING([Home Phone],4,3) + "-" + SUBSTRING([Home Phone],7,4) : LTRIM(RTRIM([Home Phone])

however I'm getting this error, I'm sure about my columns names so I'm not sure why i keep getting this error

Error at Data Flow Task [Conditional Split [2]]: Attempt to parse the expression "LEN([Home Phone]) == 10 ? (DT_STR,12,1252)SUBSTRING([Home Phone],1,3) + "-" + SUBSTRING([Home Phone],4,3) + "-" + SUBSTRING([Home Phone],7,4) : LTRIM(RTRIM([Home Phone])" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis.


Viewing all articles
Browse latest Browse all 24688


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>