title: Delete spaces and special characters
body: <p>This question is linked to :<a href="https://stackoverflow.com/questions/42237624/concatenate-a-column-on-one-line-depends-on-a-id">concatenate a column on one line depends on a id</a> </p>
  
  <p>I used this query (thanks Mihai) : </p>
  
  <pre><code>SELECT id, date,MAX(docline),
  Ids=Stuff((SELECT ' ' + doctext  FROM documentation  d WHERE d.id=documentation.id
   FOR XML PATH (''))
               , 1, 1, '' )
   from documentation where date in (02/14/2017)
  GROUP BY id,date
  </code></pre>
  
  <p>I received this line : </p>
  
  <pre><code>Backup  :                           &amp;#x0D;
  D:\Bas.bac                                 &amp;#x0D;
  test testtest&amp;#x0D;
  tesdttest testtest&amp;#x0D;
  </code></pre>
  
  <p>I would like to have something like : </p>
  
  <pre><code>Backup  : D:\Bas.bac test testtest tesdttest testtest
  </code></pre>
  
  <p>So no space and no special characters like ('<code>&amp;#x0D;</code>')</p>
  
  <p>Like you can see I have some special characters and too much space... 
  I tried to use RTrim() and LTRIM like : </p>
  
  <pre><code>SELECT id, date,MAX(docline),
  Ids=Stuff(RTRIM(SELECT ' ' + doctext  FROM documentation  d WHERE d.id=documentation.id
   FOR XML PATH ('')))
               , 1, 0, '' )
   from documentation where date in (02/14/2017)
  GROUP BY id,date
  </code></pre>
  
  <p>But I don't see any difference and I have the same behavior. </p>
  
  <p>Thanks,</p>
  
  <p>EDIT : I tried too (without success) :</p>
  
  <pre><code>Stuff((SELECT ' ' + LTRIM(RTRIM(doctext))  FROM documentation  d WHERE d.id=documentation.id FOR XML PATH ('')),1,0,'')
  </code></pre>