title: How to populate database table with names that could be in different formats?
body: <p>In <code>Table1</code> there is an <code>Input</code> column which is being filled with user-inputted customer names, either in <code>&lt;Surname&gt;, &lt;First Name&gt;</code> format or <code>&lt;First Name&gt; &lt;Surname&gt;</code> format.  There is also a <code>CustomerNo</code> column.</p>
  
  <p>In table <code>Customers</code> there are <code>Surname</code> and <code>FirstName</code> columns filled with customer names.  There is also an auto-generated <code>CustomerNo</code> column for each customer.</p>
  
  <p>What query will populate <code>Table1.CustomerNo</code> with the correct <code>CustomerNo</code> from <code>Customers</code> based on <code>Table1.Input</code>, catering for both possible formats of <code>Input</code>?</p>