Export (0) Print
Expand All

String Padding (SSIS)

The expression evaluator does not check if a string contains leading and trailing spaces, and it does not pad strings to make them the same length before it compares them. If expressions requires string padding, you can use the + operator to concatenate column values and blank strings. For more information, see + (Concatenate) (SSIS Expression).

On the other hand, if you want to remove spaces, the expression evaluator provides the LTRIM, RTRIM, and TRIM functions, which remove leading or trailing spaces, or both. For more information, see LTRIM (SSIS Expression), RTRIM (SSIS Expression), and TRIM (SSIS Expression).

Note Note

The LEN function includes leading and trailing blanks in its count.

Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com

Integration Services icon (small)  Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN:


For automatic notification of these updates, subscribe to the RSS feeds available on the page.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft