SSIS 2008 - how to do regular expression search in SSIS Derived Column tool
How do I do a regular expression in an SSIS Derived Col开发者_StackOverflow社区umn Tool
i.e.
I have string in the format XXXNNNN and I want to filter our those strings not in this format using an SSIS Derived Column Tool.
i.e
ABC1234 is ok
ABCDEFG is not.
The Derived Column transformation doesn't support regular expressions, so you'll have to look at some other options:
- Use a Script Task and write the regex using the standard .NET regex features
- Use a third-party component
- If you always have 7 characters, you could use the
SUBSTRING
andCODEPOINT
functions to check that each one is in the range you expect (see the function reference). But that's probably awkward to read and maintain, and may not be practical at all depending on what your data looks like.
精彩评论