title: Remove text after character (cut string sql)
body: <p>I would like to cut left part of text when I will find character '#' :</p>
  
  <p>Text:</p>
  
  <pre><code>1) 12341#123
  
  2) 123#1
  </code></pre>
  
  <p>Correct Result:</p>
  
  <pre><code>1) 123
  
  2) 1
  </code></pre>
  
  <p>Do you know how? </p>
  
  <p>I try use this but does not work:</p>
  
  <pre><code>LEFT(A.Vat,CHARINDEX('#',A.Vat)-1)
  </code></pre>