title: Using Variable with function - SQL
body: <p>I have custom function which return a table
  it accepts two varchars, it splits the varchar based on the delimeter</p>
  
  <pre><code>SELECT VALUE FROM dbo.Split('xxx','_') --- working
  
  select abc from abcd a,cde b where a.abc like (SELECT VALUE FROM dbo.Split(b.abc,'_'))-- not working
  
  
  select abc from abcd a,cde b where a.abc like (SELECT VALUE FROM dbo.Split('xx','_'))-- working
  
  select abc from abcd a,cde b where a.abc like (SELECT b.abc)-- working
  </code></pre>
  
  <p>How to get the not working case to work.</p>
  
  <p>Error i get it
  Incorrect syntax near '.'.</p>