I have a source report which looks like
Name Q1 Q2 Q3 Q4
A 1 2 3 4
B 5 6 7 8
C 9 0 1 2
It has to be converted into the following format
Name Quarter Value
A Q1 1
A Q2 2
A Q3 3
A Q4 4
and so on...
I’m using SSIS for ETL. Any pointers without using hard-coded values in the T-SQL script?
This would be a good match for UNPIVOT but unless you are willing to make this a dynamic sql statement, I don’t see any way around hardcoding the Quarters in the statement.
SQL Statement
Test script