• Luis Cazares (4/1/2014)


    I would unpivot[/url] the source table, join it with the metadata table, use cross tabs[/url] to obtain the desired result and run away from that horrible design.

    That destination table looks like real horror for any RDBMS.

    Horror?!? I LOVE designs like that ... they make the consultant in me go "kaaAACHIIINNNGGG"!! 😀

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service