如何动态地将所有列转换为行和行 [英] how to convert all the columns to rows and rows to columns dynamically

查看:74
本文介绍了如何动态地将所有列转换为行和行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我的桌子上有几列和几行。



主合同号con Net Revenue Deployed Payroll Net(Loan)/ Borrow Payroll Total Payroll Total Subcontractor Costs

9940012364 0 0 0 0 0

9940040036 2827.58127 81.4233 1551.70266 1633.12596 92.07216

9940052615 1624.96347 120.98094 218.0292 339.01014 244.44309

9940071895 0 0.78807 -0.68328 0.10479 0

9940117981 640.27911 0 213.83937 213.83937 7.85265

9940146065 0 0 0 0 0





所以现在这里的行必须成为列,列必须动态变成行..

像Transpose这样的东西。

请帮帮我。



提前致谢。

Hi,

I have a table with few columns and rows.

Master Contract Number con Net Revenues Deployed Payroll Net (Loan)/Borrow Payroll Total Payroll Total Subcontractor Costs
9940012364 0 0 0 0 0
9940040036 2827.58127 81.4233 1551.70266 1633.12596 92.07216
9940052615 1624.96347 120.98094 218.0292 339.01014 244.44309
9940071895 0 0.78807 -0.68328 0.10479 0
9940117981 640.27911 0 213.83937 213.83937 7.85265
9940146065 0 0 0 0 0


so here now the rows has to become columns and columns has to become rows dynamically..
Something like Transpose.
Please help me.

Thanks in advance.

推荐答案

使用 PIVOT [ ^ ]



-KR
Use PIVOT[^]

-KR


这篇关于如何动态地将所有列转换为行和行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆