title: How I can use a function which returns a table in a select statement with an inner join?
body: <p>I need to use a function which returns a table, in a inner join sentence passing a parameter.  When executed, the sentence like this is not working.</p>
  
  <pre><code>SELECT T0.Code,T0.Data1,T0,Data2 FROM  [dbo].[FNGet_Data] (T1.Code,'2010-01','USD') T0 
  INNER JOIN 
  Codes T1 ON T1.Code=T0.Code
  </code></pre>
  
  <p>When executed the sentence using a constant parameter works ok</p>
  
  <pre><code>SELECT T0.Code,T0.Data1,T0,Data2 FROM  [dbo].[FNGet_Data] ('5200','2010-01','USD') T0 
  INNER JOIN 
  Codes T1 ON T1.Code=T0.Code
  </code></pre>
  
  <p>Is it possible to call the function <code>FNGet_Data</code> using as parameter the value of another table?</p>