title: SQL Select: Update if exists, Insert if not - With date part comparison?
body: <p>I need to update a record in a database with the following fields </p>
  
  <pre><code>[ID] int (AutoIncr. PK)
  [ScorerID] int
  [Score] int
  [DateCreated] smalldatetime
  </code></pre>
  
  <p>If a record exists for todays date (only the date portion should be checked, not the time) and a given scorer, I'd like to update the score value for this guy and this day. If the scorer doesn't have a record for today, I'd like to create a new one.</p>
  
  <p>I'm getting grey hair trying to figure how to put this into a single (is this possible?) sql statement. By the way I'm using an MSSQl database and the <code>ExecuteNonQuery()</code> method to issue the query.</p>