SQL pad column content with tabs instead of spaces
<p>I am dynamically creating a column via a SELECT statement. The content of this column is a string which is then used as content for an e-mail.</p>

<p>The text looks like this:</p>

<pre><code>text 1 | text 2 | text 3 | ...
text 123 | text 223 | text 323 | ...
</code></pre>

<p>as you see, the two lines are not aligned. The expected output should be like this:</p>

<pre><code>text 1   | text 2   | text 3   | ...
text 123 | text 223 | text 323 | ...
</code></pre>

<p>The obvious solution is to pad each field in order for each field to have the same size. for this i used the following code:</p>

<pre><code>LEFT(field1 + REPLICATE(' ', 20), 20)
</code></pre>

<p>My issue is, that in Outlook the text is still not shown properly aligned even though, if I copy the text into Notepad, it is properly aligned. The reason is, that Outlook uses Arial for displaying text-mails and in Arial blank-spaces do not have the same size as the other characters. Hence the padding does not yield the expected result. </p>

<p>My question now is: Is there some other way to use this <em>padding approach</em> in order to get same size displayed fields in Outlook Mails? Probably by padding with tabs? But I think my approach above then does not work anymore...</p>