variables
I got two variable A and variable b in control flow both contain values string values ,now I want to match these variable values and after matching need to store match values in new variable ,how can we do this please let me know.Thanks
December 18th, 2010 11:20pm

Perhaps you can simply use a Script Task for this purpose like here: http://whiteknighttechnology.com/cs/blogs/brian_knight/archive/2005/12/30/57.aspxArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
December 19th, 2010 12:21am

Can you create a third variable Variable C and set its Evaluate As Expression property to True, then set up an Expression on it that concatenates Variables A and B? I assume that when you say "match" that you are concatenating the two?Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
December 19th, 2010 8:48am

I got it what you say .Match mean suppose if variable A contain values like this ppp.txt,aaa.txt,mpk.txt etc and variable b contain values like this ppt.txt,aaa.txt than I need ppt.txt ,aaa.txt in variable c.Thanks
Free Windows Admin Tool Kit Click here and download it now
December 19th, 2010 9:11pm

So really, you have two comma-separated lists and you want to find the common elements in each one. In that case, you woould need to convert each variable to a list of values (like a table) then do an inner join between the two. I know how I would solve this in T-SQL: I have a user defined function that takes a comma-separated list and returns a table variable. From there, its a simple INNER JOIN statement. Not sure how to do that in SSIS.Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
December 20th, 2010 9:10am

For logic that complex I advocate using the Script Task because multiple matching patterns solution becomes a bit convoluted when using the expressions, it is doable though, but I think it is easier to support it later and modify in a Script Task. As an added bonus with the Script Task you can use Regular Expressions in the pattern matching.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2010 9:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics