TSQL or SSIS convert Columns into Rows
Could anyone please suggest how to achieve the following开发者_JAVA技巧? i.e. convert columns in to rows using either TSQL or SSIS:
e.g. from this:
col1 col2
start end
to this:
start
end
from this:
col1 col2 col3 col4
start break start end
to this:
start
break
start
break
Thank you.
Thanks @Dalex for your answer.
Since I'm using SSIS I ended up using Unpivot Transformation Task which required no code.
精彩评论