title: Delete everything after the first white space in sql
body: <p>i am trying to use the update function to delete everything after the first white blank space.  i have tied this but not working for me so far...
  here is my code:</p>
  
  <pre><code>UPDATE MyTable
  SET MyField= LEFT(MyField, CHARINDEX('', MyField) - 1)
  WHERE CHARINDEX('', MyField) &gt; 0
  </code></pre>