Home > SSIS > SQL SERVER – Create a duplicate column during data flow – SSIS Copy Column

SQL SERVER – Create a duplicate column during data flow – SSIS Copy Column


We may need to create a duplicate copy of a column in the data flow. There are various way to achieve this. But, SSIS gives us a simple way to make a copy of a column during the data flow.

Copy Column Transformation

It helps developer to create a copy of column(s) in the data flow. So, we can use the newly created column or duplicate column for some other purpose instead of using original source column. for instance, we can use copied column for data type conversion, case conversion, for aggregation, etc.

Implementation

Step 1: Create a new package. Add a Data Flow task and go to design environment. Now, Add a data source task and configure with a valid table in a database.

Step 2: Add Copy Column Transformation in data flow layout and connect pipeline of data source task with copy column task.

Step 3: Open copy column editor and  select columns you want to duplicate in the data flow.

Step 4: Add a union all task and connect copy column task with it. To view the result during package execution, just add data viewer between copy column and union all task.

Step 5: Execute package and view the result.

For more information about Copy Column Transformation.

Thanks for reading. Visit Facebook page SQLServerRider.com and like the page for getting instant technology updates.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: