SSIS Cheat Sheet for Beginners
Getting Started With This SSIS Guide.
SSIS Expressions Cheat Sheet
Problem | Expression |
---|---|
Create a file name with today’s date | Expression on the Flat File or File Connection Manager:
Expression on the Flat File or File Connection Manager:
|
Use a 2 digit date (ex. “03” for March instead of “3”) |
Expression Output:
|
Multiple condition if statement |
In this example, the statement determines that if the ColumnName is blank or NULL, it will be set to unknown. To make a Logical AND condition, use “&&” instead of the “||” operator.
|
Returns the first five characters from a zip code |
Derived Column Transform in the Data Flow:
|
Remove a given character from a string (ex. Remove “-” from a social security number) |
Derived Column Transform in the Data Flow:
|
Uppercase data |
Derived Column Transfrom in the Data Flow:
|
Replace NULL with another value |
Derived Column Transform in the Data flow:
|
Replace blanks with NULL values |
Derived Column Transform in the Data Flow:
|
Remove any non-numeric data from a column |
Script Transform in the Data Flow Task with the code as follows (VB 2008):
|
Convert text to proper case (ex. 1st letter in each word is uppercase) |
Script Transform with the line of partial code as follows:
|
Build dynamic SQL statement |
Expression on the SQLStatementSource property of Execute SQL Task:
|
Round to the nearest two decimal mark |
Expression on Derived Column Transform:
|