MSBI-Geek
MSBI-Geek

Reputation: 648

SSIS - Store each column from CSV into rows in table

I need to create an SSIS package to load data from a CSV, the tricky part is some of the columns need to be stored as rows. I better explain it with an example below.

From CSV file to Table in a different format as shown below

enter image description here

Is it possible with in SSIS or using SQL Server.

Upvotes: 0

Views: 290

Answers (1)

Dave C
Dave C

Reputation: 7392

What you seek is called unpivot.

Please see this MSDN blog post for an example. To drop 0 values, you can use a conditional split, and push the 0 values to a garbage output.

http://blogs.msdn.com/b/dataaccesstechnologies/archive/2014/05/22/unvipot-transformation-with-a-combination-of-single-and-multiple-destination-columns.aspx

Upvotes: 2

Related Questions