title: SQL to format strings in a conditional manner like inserting spaces between big (capital) and small letters
body: <p>I'm generating the user interface labels from database columns in one of my applications. While doing this I came across an issue. The same column names as in my database table is being shown in the UI which I wish to change.<br>
  I have sample data like this:</p>
  
  <pre><code>ProductionIssueID
  MAXSerialNo
  ProductID
  Item
  </code></pre>
  
  <p>I wish to format them like this:</p>
  
  <pre><code>Production Issue ID
  MAX Serial No
  Product ID
  Item
  </code></pre>
  
  <p>The logic is:<br>
  1. When a capital alphabet succeeds the small alphabet then a space has to be inserted as shown in Production Issue ID<br>
  2. When a small alphabet succeeds a capital one then space has to be inserted as given in MAX Serial No and Product ID<br>
  3. If there is Only one capital alphabet nothing has to be done as in Item<br>
  4. No space is required between a similar pair of capital/small alphabets.  </p>
  
  <p>Please help me to achieve this. The examples are more descriptive.  </p>
  
  <p>Thanks in advance for your valuable time and efforts.  </p>