title: In a data flow task, how do I restrict rows flowing using a value from another source?
body: <p>I have an excel sheet with many tabs. Say one is called wsMain and the other is called wsDate.</p>
  
  <p>In my data flow transformation I am able to successfully load the data from wsMain to my table.</p>
  
  <p>Now I have to update this transformation where I have to fetch the maximum date from the worksheet wsDate and only load data from wsMain where the date is less than on equal to the maximum date in wsDate (that is the only column available).</p>
  
  <p>So for I have figured out that I need to create a new Excel connection manager to read the data from wsDate and I have used the Aggregate transformatioin to get the maximum date.</p>
  
  <p>Now the question is how do I use this date to restrict the rows coming from wsMain?</p>
  
  <p>I understand from the link below that you can store the value in a variable but what do I do next?:
  <a href="https://stackoverflow.com/questions/3923520/ssis-set-result-set-from-data-flow-to-variable">SSIS set result set from data flow to variable</a></p>
  
  <p>I have tried using a merge join but not sure if I am doing it right.</p>
  
  <p>Here is what it looks like now:</p>
  
  <p><a href="https://i.stack.imgur.com/bsWZ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bsWZ8.png" alt="https://imgur.com/dAXsGpm"></a></p>