title: Extract the first word of string in SQL
body: <pre><code>SELECT
      Case_number,
      Week_number,
      (LEFT(case.SUB, charindex(' ', case.SUB) - 1)) 
       AS CASE,
   and so on ....
  </code></pre>
  
  <p>Can anyone help me to extract the word before the space in CASE column? The above syntax is not working. I am not super good with SQL queries, help would be really appreciated.</p>