如何将行记录格式化为列明智 [英] How to format the row records into column wise
本文介绍了如何将行记录格式化为列明智的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SubjectID学生姓名
---------- -------------
1玛丽
1约翰
1山姆
2阿拉娜
2爱德华
我期望的结果:
SubjectID列1列2列3
1玛丽·约翰·山姆
2艾伦·爱德华
等等...
SubjectID StudentName
---------- -------------
1 Mary
1 John
1 Sam
2 Alaina
2 Edward
Result I am expecting:
SubjectID Column1 Column2 Column3
1 Mary John Sam
2 Alaina Edward
etc...
推荐答案
此链接可帮助您
http://www.c-sharpcorner.com /uploadfile/suthish_nair/convert-rows-to-columns-in-sql-server-20082005/ [
this link help you
http://www.c-sharpcorner.com/uploadfile/suthish_nair/convert-rows-to-columns-in-sql-server-20082005/[^]
What is you looking for also called as Pivot table in excel.
类似的问题在这里,我也给出了答案:
将行转换为列 [
Similar question is here and I have given answer for that as well:
convert rows into columns[^]
这篇关于如何将行记录格式化为列明智的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文