title: Using Inner Join in FilterClause
body: <p>I am rewriting the synchronization in a old project, and I want to keep it as similar to the old code as possible.</p>
  
  <p>The old code had SQL codes that are similar to the <code>FilterClause</code>. And until now it has been very simple to convert the old codes select expressions to the corresponding FilterClause. For instance:</p>
  
  <pre><code>SELECT * FROM dbo.table_a WHERE num_id = @id
  </code></pre>
  
  <p>has been translated to:</p>
  
  <pre><code>...FilterClause = "num_id = @id";
  </code></pre>
  
  <p>However, now I have run into a problem...</p>
  
  <p>The FilterClauses definition is <em>Gets or sets the SQL WHERE clause (without the WHERE keyword) that is used to filter the result set from the base table.</em>
  But now my sql expression is:</p>
  
  <pre><code>SELECT * 
  FROM dbo.table_a
  INNER JOIN 
  (
   SELECT DISTINCT(num_id) 
   FROM dbo.link_table_ab
   WHERE link_table_ab.b_index = 5
  ) T2 ON table_a.num_id= T2.num_id
  </code></pre>
  
  <p>So the problem is that there is no WHERE in the primary query... What do I do?</p>