title: How to return an NVCHAR string from SQL formatted correctly
body: <p>In our business we have a program which with functions we can return merge fields for emails and letters that the system generates. </p>
  
  <p>I am trying to write one with a cursor using <code>NVCHAR</code> but am having issues with the output for a list of invoices, the section that creates the string is: </p>
  
  <pre><code>BEGIN
      IF ( @Schedule &lt;&gt; '' )
          BEGIN
              SET @Schedule = @Schedule + CHAR(10) + CHAR(13);
          END;
  
      SET @Schedule = @Schedule + CONVERT(VARCHAR(10), @InvoiceDate, 103)
          + ' | ' + CONVERT(VARCHAR(50), @InvoiceNumber) + CHAR(9) + ' | '
          + CONVERT(VARCHAR(600), @InvoiceDescrip) + CHAR(9) + ' | '
          + CONVERT(VARCHAR(10), @InvoiceAmount) + CHAR(13);
  END;
  </code></pre>
  
  <p>Now because the invoice numbers and description can be different lengths the output it gives to the merge field is as follows:</p>
  
  <pre><code>09/06/2014 | 1568        | Item 248              | 100.00
  01/08/2014 | 123         | Item 23               | 100.00 
  18/08/2014 | Inv #12345  | Warehouse machine     | 2000.00
  </code></pre>
  
  <p>what I'm looking for is the output to be as follows:</p>
  
  <pre><code>09/06/2014 | 1568        | Item 248              | 100.00
  01/08/2014 | 123         | Item 23               | 100.00
  18/08/2014 | Inv #12345  | Warehouse machine     | 2000.00
  </code></pre>
  
  <p>Hopefully the question makes sense, I've searched elsewhere but can't seem to find something that relates to this. </p>
  
  <p>Appreciate any help anyone can offer on this.</p>