How to add a line feed in SSIS expression (it's invisible)

  • I'd like to create an email notification while the content is generated from the Message Source expression?

    How can I add a line feed? for now, I am copying and pasting what someone has already created.

    The line feed is invisible.

    Thanks for your help in advance.

  • You can use escape sequence literals within SSIS expressions - e.g. \'n' for New line, \r for Carriage return. [Ignore the quotes when coding in SSIS - I had to include them here as the parser is interpreting the escape sequence and removing it from the post !]

    Ref BOL article on SSIS Literals for the full set - http://msdn2.microsoft.com/en-us/library/ms141001.aspx


    Cheers

    Filet

  • You can use CRTL-Enter to add a line break in a quoted string in an expression, but I believe it will show up in the email as double-spaced (i.e. extra blank line). You can use the escape sequence, as noted above. You can also copy and paste text with an embedded LF character the way you are doing now. On my system the line feed shows up as a rectangle in the expression editor, but the resulting email is correct.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply