title: Select string till first or second space in string
body: <p>I have table column that contains in each row data like this:</p>
  
  <pre><code>|                 Simbols              |
  |--------------------------------------|
  |H412 Text text                        |
  |H413 Text text text text              |
  |EUH 001 Text text text text text text |
  |EUH 006 text text                     |
  |EUH 201/201A Text text. Text text     |
  </code></pre>
  
  <p>And I need from that data get data like this:</p>
  
  <pre><code>|Simbols     |
  |------------|
  |H412        |
  |H413        |
  |EUH 001     |
  |EUH 006     |
  |EUH 201/201A|
  </code></pre>
  
  <p>I tried with SUBSTRING and CHARINDEX but it till the end don't work... It takes only first space or something like that...
  QUERY:</p>
  
  <pre><code>SELECT 
  CASE 
      WHEN SUBSTRING(Simbols, 1, CHARINDEX(' ', Simbols)) = ''
      THEN Simbols + ' '
      ELSE SUBSTRING(Simbols, 1, CHARINDEX(' ', Simbols))
  END 'Simbols'
  FROM dbo.table
  </code></pre>
  
  <p>RESULT:</p>
  
  <pre><code>|  Simbols   |
  |------------|
  |H412        |
  |H413        |
  |EUH         |
  |EUH         |
  |EUH         |
  </code></pre>
  
  <p>How can I make this work, and where is the problem?
  Maybe there is different way to get these Simbols? <br />
  P.S. "Text text text" is a example, there comes a explanations of "Simbols"</p>