title: tsql : best way to update a db table with a csv file
body: <p>I have a products table in sql server 2005 which needs to be updated by certain fields in a csv file. Both files have a vendor part number which can be linked to where I can update the products.discontined field with another in the csv file.  </p>
  
  <p>My question is what is the best way to approach this?  </p>
  
  <p>I've considered creating a odbc connection to the excel file and figuring out how to merge update the 2 columns.  Import the entire csv file (~60 MB) into a temp table in sql server and then write a tsql procedure to search,compare, update?  Also doing and opensource command from query analyzer and writing a procedure to read in the csv file and update the table that way.. </p>
  
  <p>thanks in advance</p>