title: Trying to get all the text to the left of a string in SQL Server
body: <p>I created a function that returns some values and uses STUFF to put them all in one column.</p>
  
  <p>Some of the results contain:</p>
  
  <pre><code>Something, something else, ?&lt;?xml version="1.0" ... and lots of stuff in here. /&gt;
  </code></pre>
  
  <p>What I'm trying to figure out is how to remove the entire:</p>
  
  <pre><code>&lt;?xml /&gt; tag and all of its inner content.
  </code></pre>
  
  <p>The problem is, sometimes it ends up in different parts of the results per/row basis.</p>
  
  <p>So I've tried CHARINDEX, LEFT, Splits...</p>
  
  <p>Any ideas? </p>
  
  <p>Thank you. </p>