title: sql merge statement for many columns
body: <p>I am currently developing a program in C# that takes a giant excel sheet(~14,300 rows, 90 columns) and needs to insert it into a database (SQL server 2014). The user can search through the DB for different products and eventually make a quotation for the customer.</p>
  
  <p>To insert I am successfully using SQLBulkcopy to insert the excel rows into a staging table. The issue is, I want to use a merge statement to merge my staging table and real table as there maybe multiple uploads of the same file with very slight changes over time. All sql merge examples I'm finding look something like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>MERGE INTO maintable as Target
  USING stagingtable as Source
  ON Target.columnA = Source.columnA
  WHEN MATCHED THEN 
  UPDATE SET Target.Name = Source.Name
  WHEN NOT MATCHED THEN
  INSERT (columnA, Name)
  VALUES (Source.columnA, source.Name)
  </code></pre>
  
  
  
  <p>The statement would work but the issue is, my excel file has 90 columns. Is there a way to update the whole row at a time or do I have to update each of the 90 columns of a row ? </p>