title: SQL How to add ID column into a Split select
body: <p>I have the following query:</p>
  
  <pre><code>SELECT s FROM dbo.Split(',',(
  select 
  emp.Data
  FROM Employee emp
  WHERE EmployeeID = 56640
  ))
  </code></pre>
  
  <p>The Data column is a comma separated value:</p>
  
  <pre><code>emp.Data has the value: '461086,461104'
  </code></pre>
  
  <p>This returns the following table:</p>
  
  <p><a href="https://i.stack.imgur.com/HDQuk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HDQuk.png" alt="enter image description here"></a></p>
  
  <p>Now, I need to add to this select the <code>EmployeeID</code> column, so I need something like this</p>
  
  <pre><code>SELECT s FROM dbo.Split(',',(
  select 
  emp.EmployeeId,
  emp.Data
  FROM Employee emp
  WHERE EmployeeID = 56640
  ))
  </code></pre>
  
  <p>But this give me an error.</p>
  
  <p>Any clue?</p>