September 14, 2010 at 10:33 am
How to validate a column in this format ---> xx-xxxxxxx
September 16, 2010 at 4:35 am
PSB (9/14/2010)
How to validate a column in this format ---> xx-xxxxxxx
A script task and Regular expression :rolleyes::hehe::cool:
Raunak J
September 16, 2010 at 6:28 am
Or the clever use of LEN and FINDSTRING in a derived column.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
September 16, 2010 at 6:31 am
da-zero (9/16/2010)
Or the clever use of LEN and FINDSTRING in a derived column.
😉
I missed here
Raunak J
September 22, 2010 at 9:43 am
Use a Conditional Split component to split off the "invalid" rows. Use a condition that checks that the LEN([Column]) == 10, and that SUBSTRING([Column], 3, 1) == "-".
You weren't clear what values were allowable in the "x" positions - so just testing for those two things will allow any values.
Todd McDermid - SQL Server MVP, MCTS (SQL 08 BI), MCSD.Net
My Blog - Dimension Merge SCD Component for SSIS - SSIS Community Tasks and Components
September 23, 2010 at 2:30 pm
I was looking for something like this 713-777-9906
September 23, 2010 at 9:46 pm
PSB (9/23/2010)
I was looking for something like this 713-777-9906
Now definitely i'll be using a REGEX
Raunak J
September 24, 2010 at 1:43 pm
Can you give an example .
September 24, 2010 at 9:57 pm
Regex newPattern=new Regex("[0-9]+[-][0-9]+[-][0-9]+")
Explanation: not beginning with alphabets and having atleast one occurance or more of numeric followed by dash(hyphen) which is followed by one or more occurance of numerals again a dash(hypen) and numerals
You may customize the length of the expression to suit your need. :-):-)
Raunak J
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply