Denormalizing Data (Maybe A Pivot?)

后端 未结 3 748
梦如初夏
梦如初夏 2020-12-19 18:10

I have a simple table containing Student Numbers and corresponding Teacher Numbers, and I need to denormalize it for input to a legacy system.

For example, here\'s

3条回答
  •  粉色の甜心
    2020-12-19 18:44

    I second PIVOT.

    Here are two interesting links with programmatic solutions to dynamic crosstab data in SQL.

    http://www.simple-talk.com/sql/t-sql-programming/creating-cross-tab-queries-and-pivot-tables-in-sql/

    http://www.simple-talk.com/sql/t-sql-programming/crosstab-pivot-table-workbench/

提交回复
热议问题