问题
Please see the below flowchart.
How can i really achieve it. It tried various things in the SSIS Expression.
回答1:
If you want to use regular expressions then you could use a Script Component to fill a (new) column and then use a Conditional Split to filter on that column. Or you could redirect the 'good' and 'bad' rows to their own output within the Script Component itself. Here is an example of that. It redirects bad email addresses to an other output: http://microsoft-ssis.blogspot.com/2011/03/regular-expressions-in-ssis.html
回答2:
Assuming any number from 0 to 99999 should be considered 'True', then you can attempt a cast and redirect the error row to 'False' if the cast to integer fails. Example:
your conditional split will be False when
(DT_I4)[Column1] > 99999
and your data flow should look like this:
来源:https://stackoverflow.com/questions/22754312/ssis-conditional-split-but-want-to-check-a-pattern