Issue while using Unpivot then Pivot transformation in SSIS RRS feed

  • Question

  • Hi,

    I have a data set on which i want to first unpivot the data based on certail columns and then pivot the data based on another column. Please see the screenshot for the details. I am getting duplicate records. Please help.

    Tuesday, July 23, 2013 8:14 AM


  • This is an issue with the PIVOT, that works with SORTED records based on the SET Key!

    you can add a SORT transform after the unpivot transform, and sort data based on MONTH,

    then in PIVOT you will get result as expected

    <b><a href="http://www.radacad.com/CoursePlan.aspx?course=1">SQL Server 2012 Integration Services - Tutorial Videos</a></b> <p>  </p> <a href="http://www.rad.pasfu.com">http://www.rad.pasfu.com</a>

    • Proposed as answer by Mike Yin Monday, July 29, 2013 2:33 AM
    • Marked as answer by Mike Yin Wednesday, July 31, 2013 3:42 PM
    Tuesday, July 23, 2013 11:08 AM