title: Join returns NULL when data that matches is in the table
body: <p>I'm trying to get results when both tables have the same machine number and there are entries that have the same number in both tables.<br>
  Here is what I've tried:</p>
  
  <pre><code>SELECT fehler.*,
    'maschine.Maschinen-Typ',
    maschine.Auftragsnummer,
    maschine.Kunde,
    maschine.Liefertermin_Soll 
  FROM fehler 
  JOIN maschine 
    ON ltrim(rtrim('maschine.Maschinen-Nr')) = ltrim(rtrim(fehler.Maschinen_Nr))
  </code></pre>
  
  <p>The field I'm joining on is a <code>varchar</code> in both cases. I tried without trims but still returns empty<br>
  I'm using MariaDB (if that's important).</p>