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.
The text looks like this:
text 1 | text 2 | text 3 | ...
text 123 | text 223 | text 323 | ...
as you see, the two lines are not aligned. The expected output should be like this:
text 1 | text 2 | text 3 | ...
text 123 | text 223 | text 323 | ...
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:
LEFT(field1 + REPLICATE(' ', 20), 20)
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.
My question now is: Is there some other way to use this padding approach 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...