title: SQL Server 2005 - Inserting records using OpenXML vs delimited string
body: <p>I have a bunch of employee names which need to be inserted in a table.</p>
  
  <p>Should I represent my data like this and use OpenXML to insert into the database:-</p>
  
  <pre><code>&lt;Employees&gt;
  &lt;Employee&gt;
  Emp1
  &lt;/Employee&gt;
  &lt;Employee&gt;
  Emp2
  &lt;/Employee&gt;
  &lt;Employee&gt;
  Emp2
  &lt;/Employee&gt;
  &lt;/Employees&gt;
  </code></pre>
  
  <p>OR</p>
  
  <p>I should represent the Employee like <code>Emp1,Emp2,Emp3</code>, split the string, add to a table variable and then insert into the database table.</p>
  
  <p>Are there any performance difference between the two approaches. Please note that this is very simple structure without any nesting of employees in the XML and without more than one delimiter in the string. This XML is also not going to be used as schema or anything. Would OpenXML be the overkill? Could anybody give some direction on this? </p>