开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜