expression - SSIS Substring Extract based on qualifier -
I have seen some different posts to find a solution for this. I have a column that includes details following the following formats:
string & lt; Numerical & gt;
However, the column is not limited to one set of the previously mentioned format, it can be something like this
UNI <01> Jpg & lt; 84 & gt; Jpg & lt; 84 & gt; From UNI & lt; 01 & gt; Jpg & lt; 84 & gt; From UNI & lt; 01 & gt;
and other variations without any controlled patterns.
What I need to do is remove the number between & lt;> in a different column in another table based on that, the string before & lt;> then the UNI will go to a certain table Will qualify for the following numericals. Columns, while JPGs will qualify for other table etc. I have not been able to see the numerical removal work, but it works only to qualify and draw only numerical if it has a given qualifiers string
Only one type of token (foo, bar, blot depending on the scope limit described in the commentary of the question , Etc.) need to be received at one time: You can use an expression in the derived column to find the token of interest and then remove the value between the arrows.
For example:
FINDSTRING ([InputColumn], @ [user: searchToken] + "<", 1) == 0)? NULL (DT_WSTR, 1): SUBSTRING ([InputColumn], FINDSTRING ([InputColumn], @ [user: searchToken] + "& lt;", 1) + lan (@ [user: searchtoken]) + 1, search (SUBSTRING ([InputColumn], FINDSTRING ([InputColumn], @ [user: searchToken] + "& lt;", 1) + lan (@ [user: searchtoken]) + 1, [InputColumn]) First, checks expression, whether the token specified in
to output the value between the arrows If not, then zero is returned.@ [User :: SearchToken]
is used in the current row or not. If it is, thenSUBSTRING Using The assumption is that the name of a token will not be the text that matches the name of another token. Token Bar Bar > and FooBar > 123> . Bar as a different token and Fubar may be compatible but the expected expression will be very complex.
Comments
Post a Comment